Lines Matching defs:off
49 static inline size_t w1_f23_fix_count(loff_t off, size_t count, size_t size)
51 if (off > size)
54 if ((off + count) > size)
55 return (size - off);
65 int off = block * W1_PAGE_SIZE;
76 wrbuf[1] = off & 0xff;
77 wrbuf[2] = off >> 8;
79 w1_read_block(sl->master, &data->memory[off], W1_PAGE_SIZE);
82 if (crc16(CRC16_INIT, &data->memory[off], W1_PAGE_SIZE) == CRC16_VALID)
91 loff_t off, size_t count)
101 count = w1_f23_fix_count(off, count, W1_EEPROM_SIZE);
109 min_page = (off >> W1_PAGE_BITS);
110 max_page = (off + count - 1) >> W1_PAGE_BITS;
117 memcpy(buf, &data->memory[off], count);
128 wrbuf[1] = off & 0xff;
129 wrbuf[2] = off >> 8;
207 loff_t off, size_t count)
212 count = w1_f23_fix_count(off, count, W1_EEPROM_SIZE);
218 if ((off & W1_PAGE_MASK) || (count & W1_PAGE_MASK)) {
219 dev_err(&sl->dev, "invalid offset/count off=%d cnt=%zd\n",
220 (int)off, count);
227 dev_err(&sl->dev, "bad CRC at offset %d\n", (int)off);
238 addr = off + idx;