Re: [PATCH] include: sysfs: Add macro to assign show for RO attributes

2021-01-27 Thread Greg Kroah-Hartman
On Wed, Jan 27, 2021 at 08:51:26PM +0800, Orson Zhai wrote: > On Wed, Jan 27, 2021 at 08:50:28AM +0100, Greg Kroah-Hartman wrote: > > On Wed, Jan 27, 2021 at 12:19:22PM +0800, Orson Zhai wrote: > > > In some circumstances, multiple __ATTR_RO attributes need to be assigned > > > with a single show f

Re: [PATCH] include: sysfs: Add macro to assign show for RO attributes

2021-01-27 Thread Orson Zhai
On Wed, Jan 27, 2021 at 08:50:28AM +0100, Greg Kroah-Hartman wrote: > On Wed, Jan 27, 2021 at 12:19:22PM +0800, Orson Zhai wrote: > > In some circumstances, multiple __ATTR_RO attributes need to be assigned > > with a single show function. > > > > Add this macro to make life easier with simple cod

Re: [PATCH] include: sysfs: Add macro to assign show for RO attributes

2021-01-26 Thread Greg Kroah-Hartman
On Wed, Jan 27, 2021 at 12:19:22PM +0800, Orson Zhai wrote: > In some circumstances, multiple __ATTR_RO attributes need to be assigned > with a single show function. > > Add this macro to make life easier with simple code. > > Signed-off-by: Orson Zhai > --- > Documentation/filesystems/sysfs.rs

[PATCH] include: sysfs: Add macro to assign show for RO attributes

2021-01-26 Thread Orson Zhai
In some circumstances, multiple __ATTR_RO attributes need to be assigned with a single show function. Add this macro to make life easier with simple code. Signed-off-by: Orson Zhai --- Documentation/filesystems/sysfs.rst | 2 ++ include/linux/sysfs.h | 5 + 2 files changed, 7