Re: [PATCH v2 09/10] sysfs: bin_attribute: add const read/write callback variants

2024-12-03 Thread Thomas Weißschuh
On 2024-12-03 11:06:16-0500, James Bottomley wrote: > > diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h > > index > > d17c473c1ef292875475bf3bdf62d07241c13882..d713a6445a6267145a7014f308d > > f3bb25b8c3287 100644 > > --- a/include/linux/sysfs.h > > +++ b/include/linux/sysfs.h > > @@ -305

Re: [PATCH v2 09/10] sysfs: bin_attribute: add const read/write callback variants

2024-12-03 Thread James Bottomley
> diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h > index > d17c473c1ef292875475bf3bdf62d07241c13882..d713a6445a6267145a7014f308d > f3bb25b8c3287 100644 > --- a/include/linux/sysfs.h > +++ b/include/linux/sysfs.h > @@ -305,8 +305,12 @@ struct bin_attribute { > struct address_space

[PATCH v2 09/10] sysfs: bin_attribute: add const read/write callback variants

2024-11-03 Thread Thomas Weißschuh
To make it possible to put struct bin_attribute into read-only memory, the sysfs core has to stop passing mutable pointers to the read() and write() callbacks. As there are numerous implementors of these callbacks throughout the tree it's not possible to change all of them at once. To enable a step