All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/5] driver core: Allow the constification of device attributes
@ 2026-05-12 16:39 Thomas Weißschuh
  2026-05-12 16:39 ` [PATCH v3 1/5] driver core: Delete DEVICE_ATTR_PREALLOC() Thomas Weißschuh
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Thomas Weißschuh @ 2026-05-12 16:39 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rafael J. Wysocki, Danilo Krummrich
  Cc: driver-core, linux-kernel, Thomas Weißschuh

Allow device 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.

My goal is to migrate all sysfs attribute of a given driver or subsystem
at once to avoid code churn through. To do that all sysfs features the
subsystem uses need to be const-compatible. Which means that the
migration of device attributes and is_visible() are happening
concurrently.

After device attributes only kobject attributes are missing for a full
conversion.

---
Changes in v3:
- Also constify DEVICE_ATTR_RO(dev)
- Also handle DEVICE_ATTR_*_NAMED()
- Link to v2: https://patch.msgid.link/20260504-sysfs-const-attr-device_attr-prep-v2-0-79d291cb3071@weissschuh.net

Changes in v2:
- Rebase on v7.1-rc1
- Extend cover letter a bit
- Link to v1: https://patch.msgid.link/20260408-sysfs-const-attr-device_attr-prep-v1-0-232934f77b3c@weissschuh.net

To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: "Rafael J. Wysocki" <rafael@kernel.org>
To: Danilo Krummrich <dakr@kernel.org>
Cc: driver-core@lists.linux.dev
Cc: linux-kernel@vger.kernel.org
Signed-of-by: Thomas Weißschuh <linux@weissschuh.net>

---
Thomas Weißschuh (5):
      driver core: Delete DEVICE_ATTR_PREALLOC()
      driver core: Add low-level macros for device attributes
      driver core: Stop using generic sysfs macros for device attributes
      driver core: Allow the constification of device attributes
      driver core: Constify core device attributes

 drivers/base/core.c    |  54 +++++++++++----------
 include/linux/device.h | 129 +++++++++++++++++++++++++++++++++++++------------
 2 files changed, 126 insertions(+), 57 deletions(-)
---
base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731
change-id: 20260408-sysfs-const-attr-device_attr-prep-9971fb4439da

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


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

end of thread, other threads:[~2026-05-26 15:38 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-12 16:39 [PATCH v3 0/5] driver core: Allow the constification of device attributes Thomas Weißschuh
2026-05-12 16:39 ` [PATCH v3 1/5] driver core: Delete DEVICE_ATTR_PREALLOC() Thomas Weißschuh
2026-05-12 16:39 ` [PATCH v3 2/5] driver core: Add low-level macros for device attributes Thomas Weißschuh
2026-05-12 16:39 ` [PATCH v3 3/5] driver core: Stop using generic sysfs " Thomas Weißschuh
2026-05-12 16:39 ` [PATCH v3 4/5] driver core: Allow the constification of " Thomas Weißschuh
2026-05-26 14:52   ` Mark Brown
2026-05-26 15:25     ` Mark Brown
2026-05-26 15:32       ` Danilo Krummrich
2026-05-26 15:38         ` Mark Brown
2026-05-12 16:39 ` [PATCH v3 5/5] driver core: Constify core " Thomas Weißschuh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.