[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250116-sysfs-const-attr-prep-v1-0-15e72dba4205@weissschuh.net>
Date: Thu, 16 Jan 2025 18:32:26 +0100
From: Thomas Weißschuh <linux@...ssschuh.net>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>
Cc: linux-kernel@...r.kernel.org,
Thomas Weißschuh <linux@...ssschuh.net>
Subject: [PATCH 0/6] sysfs: prepare the constification of struct attribute
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@...ssschuh.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@...ssschuh.net>
Powered by blists - more mailing lists