Re: [PATCH 0/5] driver core: Allow the constification of device attributes

Greg Kroah-Hartman
2026-04-09T05:36:38Z

On Wed, Apr 08, 2026 at 09:30:46PM +0200, Thomas Weißschuh wrote:
> Allow device attribute to reside in read-only memory.
> Both const and non-const attributes are handled by the utility macros
> and attributes can be migrated one-by-one.
>
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> ---
> Thomas Weißschuh (5):
> driver core: Delete DEVICE_ATTR_PREALLOC()
> driver core: Add low-level macros for device attributes
> driver core: stop using generic sysfs macros for device attributes
> driver core: Allow the constification of device attributes
> driver core: Constify core device attributes
>
> drivers/base/core.c | 50 ++++++++++----------
> include/linux/device.h | 122 +++++++++++++++++++++++++++++++++++++------------
> 2 files changed, 121 insertions(+), 51 deletions(-)
> ---
> base-commit: 6c8dfb0362732bf1e4829867a2a5239fedc592d0
> change-id: 20260408-sysfs-const-attr-device_attr-prep-9971fb4439da
>
> Best regards,
> --
> Thomas Weißschuh <linux@weissschuh.net>
>
>

We still have the is_visible_const() stuff not finished yet, why not fix
that up first?

And this makes me worry, how many changes are going to be needed to move
everything over? thousands?

thanks,

greg k-h