Re: [PATCH v3 4/7] sysfs: attribute_group: enable const variants of is_visible()
From: Thomas Weißschuh
Date: Tue Aug 19 2025 - 10:10:31 EST
On 2025-08-19 13:28:40+0200, Greg Kroah-Hartman wrote:
> On Mon, Aug 11, 2025 at 11:14:30AM +0200, Thomas Weißschuh wrote:
> > When constifying instances of struct attribute, for consistency the
> > corresponding .is_visible() callback should be adapted, too.
> > Introduce a temporary transition mechanism until all callbacks are
> > converted.
>
> I count about 600+ users of is_visible() now, how is that going to be
> converted? It feels like a lot of churn/work, what's the plan here?
The idea was to convert one driver at a time to the const variants.
Adapting is_visible(), read(), write() and the group structs
together. And then submit these batched per subsystem.
It's not a purely mechanical change as the users may modify their
attributes.
It will be a lot of churn. is_visible() is not even the big one.
> These changes seem a lot more intrusive than the bin_attr ones :(
Indeed :-/
Thomas