[PATCH 0/4] kobject: Allow the constification of kobject attributes
From: Thomas Weißschuh
Date: Fri May 29 2026 - 12:49:23 EST
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@xxxxxxxxxxxxxx>
---
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@xxxxxxxxxxxxxx>