[PATCH 0/4] kobject: Allow the constification of kobject attributes

Thomas Weißschuh posted 4 patches 1 week, 2 days ago
include/linux/kobject.h           | 75 ++++++++++++++++++++++++++++++++++++---
lib/kobject.c                     |  8 +++--
samples/kobject/kobject-example.c | 24 ++++++-------
3 files changed, 89 insertions(+), 18 deletions(-)
[PATCH 0/4] kobject: Allow the constification of kobject attributes
Posted by Thomas Weißschuh 1 week, 2 days ago
Allow kobject 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.

This is the last preparation step to enable the constification of all
attributes throughout the tree.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
Thomas Weißschuh (4):
      kobject: Provide macros to initialize 'struct kobj_attribute'
      samples/kobject: Switch to the new __KOBJ_ATTR() macro
      kobject: Allow the constification of kobject attributes
      samples/kobject: Constify kobject attributes

 include/linux/kobject.h           | 75 ++++++++++++++++++++++++++++++++++++---
 lib/kobject.c                     |  8 +++--
 samples/kobject/kobject-example.c | 24 ++++++-------
 3 files changed, 89 insertions(+), 18 deletions(-)
---
base-commit: 56785dcb2ef6d3cff82ac33f2e34db94377416a3
change-id: 20260525-sysfs-const-attr-kobj-attr-prep-9a5d72913fee

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