Lines Matching refs:count
44 ssize_t count; in sysfs_kf_seq_show() local
48 count = seq_get_buf(sf, &buf); in sysfs_kf_seq_show()
49 if (count < PAGE_SIZE) { in sysfs_kf_seq_show()
60 count = ops->show(kobj, of->kn->priv, buf); in sysfs_kf_seq_show()
61 if (count < 0) in sysfs_kf_seq_show()
62 return count; in sysfs_kf_seq_show()
69 if (count >= (ssize_t)PAGE_SIZE) { in sysfs_kf_seq_show()
73 count = PAGE_SIZE - 1; in sysfs_kf_seq_show()
75 seq_commit(sf, count); in sysfs_kf_seq_show()
80 size_t count, loff_t pos) in sysfs_kf_bin_read() argument
86 if (!count) in sysfs_kf_bin_read()
92 if (pos + count > size) in sysfs_kf_bin_read()
93 count = size - pos; in sysfs_kf_bin_read()
99 return battr->read(of->file, kobj, battr, buf, pos, count); in sysfs_kf_bin_read()
104 size_t count, loff_t pos) in sysfs_kf_read() argument
125 return min_t(ssize_t, count, len); in sysfs_kf_read()
130 size_t count, loff_t pos) in sysfs_kf_write() argument
135 if (!count) in sysfs_kf_write()
138 return ops->store(kobj, of->kn->priv, buf, count); in sysfs_kf_write()
143 size_t count, loff_t pos) in sysfs_kf_bin_write() argument
152 count = min_t(ssize_t, count, size - pos); in sysfs_kf_bin_write()
154 if (!count) in sysfs_kf_bin_write()
160 return battr->write(of->file, kobj, battr, buf, pos, count); in sysfs_kf_bin_write()