Re: [PATCH RFC 2/2] sysfs: add helper macro for showing simple integer values

2020-09-02 Thread Alex Dewar
On Sun, Aug 30, 2020 at 11:13:53AM +0200, Greg Kroah-Hartman wrote: > On Sun, Aug 30, 2020 at 12:37:17AM +0100, Alex Dewar wrote: > > sysfs attributes are supposed to be only single values, which are > > printed into a buffer of PAGE_SIZE. Accordingly, for many simple > > attributes, sprintf() can

Re: [PATCH RFC 2/2] sysfs: add helper macro for showing simple integer values

2020-08-30 Thread Greg Kroah-Hartman
On Sun, Aug 30, 2020 at 12:37:17AM +0100, Alex Dewar wrote: > sysfs attributes are supposed to be only single values, which are > printed into a buffer of PAGE_SIZE. Accordingly, for many simple > attributes, sprintf() can be used like so: > static ssize_t my_show(..., char *buf) > { >