public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC 00/10] driver core: constify groups arrays in several structs
@ 2026-02-17 22:24 Heiner Kallweit
  2026-02-17 22:25 ` [PATCH RFC 01/10] IB/core: Prepare for immutable device groups Heiner Kallweit
                   ` (9 more replies)
  0 siblings, 10 replies; 16+ messages in thread
From: Heiner Kallweit @ 2026-02-17 22:24 UTC (permalink / raw)
  To: Thomas Weißschuh, Greg Kroah-Hartman, Rafael J. Wysocki,
	Danilo Krummrich, Jason Gunthorpe, Leon Romanovsky,
	Alexandre Belloni
  Cc: driver-core, Linux Kernel Mailing List, linux-rdma, linux-rtc

This series constifies the attribute group groups arrays in a number
of structs, plus some preparation work. This allows to assign constant
arrays, w/o "discards const qualifier" compiler warning.
This is a step towards to goal to e.g. create constant arrays in macro
__ATTRIBUTE_GROUPS().

There may be drivers not covered by my test scenarios which conflict
with this series. Therefore I send it as RFC for now.
Hopefully some CI checking this series provides additional hints.

Heiner Kallweit (10):
  IB/core: Prepare for immutable device groups
  rtc: prepare for struct device member groups becoming a constant array
  sysfs: constify group arrays in function arguments
  driver: core: constify groups array argument in device_add_groups and
    device_remove_groups
  driver core: make struct device member groups a constant array
  driver core: make struct device_type member groups a constant array
  driver core: make struct bus_type groups members constant arrays
  driver core: make struct class groups members constant arrays
  driver core: make struct device_driver groups members contact arrays
  kobject: make struct kobject member default_groups a constant array

 drivers/base/base.h              |  6 ++++--
 drivers/base/core.c              |  5 +++--
 drivers/base/driver.c            |  4 ++--
 drivers/infiniband/core/device.c |  9 ++++-----
 drivers/rtc/sysfs.c              |  8 ++++----
 fs/sysfs/group.c                 | 10 +++++-----
 include/linux/device.h           |  8 ++++----
 include/linux/device/bus.h       |  6 +++---
 include/linux/device/class.h     |  4 ++--
 include/linux/device/driver.h    |  4 ++--
 include/linux/kobject.h          |  2 +-
 include/linux/sysfs.h            | 16 ++++++++--------
 12 files changed, 42 insertions(+), 40 deletions(-)

-- 
2.53.0


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

end of thread, other threads:[~2026-02-21 14:04 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-17 22:24 [PATCH RFC 00/10] driver core: constify groups arrays in several structs Heiner Kallweit
2026-02-17 22:25 ` [PATCH RFC 01/10] IB/core: Prepare for immutable device groups Heiner Kallweit
2026-02-18  8:54   ` Leon Romanovsky
2026-02-17 22:26 ` [PATCH RFC 02/10] rtc: prepare for struct device member groups becoming a constant array Heiner Kallweit
2026-02-19  0:53   ` yanjun.zhu
2026-02-20 14:38     ` Alexandre Belloni
2026-02-17 22:27 ` [PATCH RFC 03/10] sysfs: constify group arrays in function arguments Heiner Kallweit
2026-02-17 22:28 ` [PATCH RFC 04/10] driver: core: constify groups array argument in device_add_groups and device_remove_groups Heiner Kallweit
2026-02-17 22:28 ` [PATCH RFC 05/10] driver core: make struct device member groups a constant array Heiner Kallweit
2026-02-17 22:29 ` [PATCH RFC 06/10] driver core: make struct device_type " Heiner Kallweit
2026-02-17 22:30 ` [PATCH RFC 07/10] driver core: make struct bus_type groups members constant arrays Heiner Kallweit
2026-02-17 22:30 ` [PATCH RFC 08/10] driver core: make struct class " Heiner Kallweit
2026-02-17 22:31 ` [PATCH RFC 09/10] driver core: make struct device_driver groups members contact arrays Heiner Kallweit
2026-02-17 22:32 ` [PATCH RFC 10/10] kobject: make struct kobject member default_groups a constant array Heiner Kallweit
2026-02-21 13:27   ` Thomas Weißschuh
2026-02-21 14:04     ` Heiner Kallweit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox