Lines Matching defs:buf
76 unsigned int offset, void *buf, size_t bytes)
83 if (!mac_pton(buf, mac))
89 ether_addr_copy(buf, mac);
94 static int u_boot_env_add_cells(struct u_boot_env *priv, uint8_t *buf,
98 char *data = buf + data_offset;
149 uint8_t *buf;
152 buf = kcalloc(1, priv->mtd->size, GFP_KERNEL);
153 if (!buf) {
158 err = mtd_read(priv->mtd, 0, priv->mtd->size, &bytes, buf);
181 crc32 = le32_to_cpu(*(__le32 *)(buf + crc32_offset));
185 calc = crc32(~0, buf + crc32_data_offset, crc32_data_len) ^ ~0L;
192 buf[priv->mtd->size - 1] = '\0';
193 err = u_boot_env_add_cells(priv, buf, data_offset, data_len);
198 kfree(buf);