Lines Matching defs:count
40 * Check the file size bounds and adjusts count as needed.
43 static inline size_t w1_f0d_fix_count(loff_t off, size_t count, size_t size)
48 if ((off + count) > size)
51 return count;
59 * count must not exceed W1_F0D_READ_MAXLEN.
61 static int w1_f0d_readblock(struct w1_slave *sl, int off, int count, char *buf)
76 w1_read_block(sl->master, buf, count);
82 w1_read_block(sl->master, cmp, count);
84 if (!memcmp(cmp, buf, count))
96 char *buf, loff_t off, size_t count)
99 int todo = count;
101 count = w1_f0d_fix_count(off, count, W1_F0D_EEPROM_SIZE);
102 if (count == 0)
117 count = -EIO;
128 return count;
204 char *buf, loff_t off, size_t count)
210 count = w1_f0d_fix_count(off, count, W1_F0D_EEPROM_SIZE);
211 if (count == 0)
218 len = count;
228 count = -EIO;
242 count = -EIO;
249 count = -EIO;
261 return count;