]> git.ipfire.org Git - thirdparty/linux.git/commit
sysfs: transparently handle const pointers in ATTRIBUTE_GROUPS()
authorThomas Weißschuh <linux@weissschuh.net>
Wed, 29 Oct 2025 08:12:11 +0000 (09:12 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Nov 2025 14:16:35 +0000 (15:16 +0100)
commit964c93b1eef37e3bbe0edb37346c076217d71fe7
tree93b833cc3b3e5ac6c90d44164b4481400d8f6d4e
parentf85d90dd8d0efbc75e79698e147c6e682df22e1a
sysfs: transparently handle const pointers in ATTRIBUTE_GROUPS()

To ease the constification process of 'struct attribute', transparently
handle the const pointers in ATTRIBUTE_GROUPS(). A cast is used instead
of assigning to .attrs_new as it keeps the macro smaller. As both
members are aliased to each other the result is identical.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20251029-sysfs-const-attr-prep-v5-2-ea7d745acff4@weissschuh.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/sysfs.h