The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH 0/6] sysfs: prepare the constification of struct attribute
@ 2025-01-16 17:32 Thomas Weißschuh
  2025-01-16 17:32 ` [PATCH 1/6] sysfs: attribute_group: allow registration of const attribute Thomas Weißschuh
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Thomas Weißschuh @ 2025-01-16 17:32 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rafael J. Wysocki; +Cc: linux-kernel, Thomas Weißschuh

The migration of 'struct attribute' and its related structures and
macros are more complicated than those for 'struct bin_attribute'.
Mostly because they are all shared by various custom attribute types.
Introduce some initial utilities to support the migration.
These are enough to migrate some specialized attributes atomically or
those which don't use 'struct attribute' in their callbacks stepwise.

The big outstanding problems are 'struct device_attribute' and
'struct kobj_attribute'. These are used everywhere and I'm not yet sure
about a migration plan.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
Thomas Weißschuh (6):
      sysfs: attribute_group: allow registration of const attribute
      sysfs: transparently handle const pointers in ATTRIBUTE_GROUPS()
      sysfs: introduce __SYSFS_FUNCTION_ALTERNATIVE()
      sysfs: attribute_group: enable const variants of is_visible()
      samples/kobject: add is_visible() callback to attribute group
      samples/kobject: constify 'struct foo_attribute'

 fs/sysfs/group.c               | 10 ++++++++--
 include/linux/sysfs.h          | 26 +++++++++++++++++++++----
 samples/kobject/kset-example.c | 44 ++++++++++++++++++++++++++++--------------
 3 files changed, 60 insertions(+), 20 deletions(-)
---
base-commit: 619f0b6fad524f08d493a98d55bac9ab8895e3a6
change-id: 20250114-sysfs-const-attr-prep-e9414982dc4f

Best regards,
-- 
Thomas Weißschuh <linux@weissschuh.net>


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-06-28  8:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-16 17:32 [PATCH 0/6] sysfs: prepare the constification of struct attribute Thomas Weißschuh
2025-01-16 17:32 ` [PATCH 1/6] sysfs: attribute_group: allow registration of const attribute Thomas Weißschuh
2025-01-17  7:01   ` Greg Kroah-Hartman
2025-06-28  8:19     ` Thomas Weißschuh
2025-06-28  8:30       ` Greg Kroah-Hartman
2025-01-16 17:32 ` [PATCH 2/6] sysfs: transparently handle const pointers in ATTRIBUTE_GROUPS() Thomas Weißschuh
2025-01-16 17:32 ` [PATCH 3/6] sysfs: introduce __SYSFS_FUNCTION_ALTERNATIVE() Thomas Weißschuh
2025-01-16 17:32 ` [PATCH 4/6] sysfs: attribute_group: enable const variants of is_visible() Thomas Weißschuh
2025-01-16 17:32 ` [PATCH 5/6] samples/kobject: add is_visible() callback to attribute group Thomas Weißschuh
2025-01-16 17:32 ` [PATCH 6/6] samples/kobject: constify 'struct foo_attribute' Thomas Weißschuh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox