All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/9] ACPI: use named initializers for acpi_device_id
@ 2026-07-27 12:10 Pawel Zalewski (The Capable Hub)
  2026-07-27 12:10 ` [PATCH 1/9] ACPI: use a named initializer " Pawel Zalewski (The Capable Hub)
                   ` (9 more replies)
  0 siblings, 10 replies; 20+ messages in thread
From: Pawel Zalewski (The Capable Hub) @ 2026-07-27 12:10 UTC (permalink / raw)
  To: Rafael J. Wysocki, Len Brown, Bjorn Helgaas, Zhang Rui,
	Kai-Heng Feng, Tony Luck, Borislav Petkov, Hanjun Guo,
	Mauro Carvalho Chehab, Shuai Xue, Lorenzo Pieralisi, Sudeep Holla,
	Catalin Marinas, Will Deacon, Dan Williams, Vishal Verma,
	Dave Jiang, Alison Schofield, Ira Weiny
  Cc: linux-acpi, linux-kernel, linux-pci, linux-arm-kernel, nvdimm,
	Pawel Zalewski (The Capable Hub)

This series is converting lists that contain the acpi_device_id 
struct, which is defined in the include/linux/device-id/acpi.h 
to makes use of named initializers (which they do not use currently).
This work is part of the on going effort in the kernel associated
with device-ids [1]

The plan is to convert acpi_device_id::driver_data to have an anonymous 
union, similarly to what was introduced for PCI and I2C device ID tables.
The goal is to increase type-safety (as most of the existing casts are gone), 
to improve readability and to make use intent a bit more clear:

```
union {
	kernel_ulong_t driver_data;
	const void *driver_data_ptr;
}
```

But for that to work all lists containing the structs need to use named
initializers first. I already have patches that implement this and touching
a lot of kernel subsystmes that use the acpi_device_id struct and that list
keeps on growing. Therefore, I have decided to split the series per every
subsystem into:
- pre-clean-ups that convert the lists to use named initializers
- actual implementations that make some of the modules use the new driver_data_ptr

That way the task can be fragmented into manageable and independent
chunks of work and makes this effort easier to review.

Tested builds on arm64 and x86-64 in Yocto on 7.2-rc5

[1] https://lore.kernel.org/all/cover.1780048925.git.u.kleine-koenig@baylibre.com/

Signed-off-by: Pawel Zalewski (The Capable Hub) <pzalewski@thegoodpenguin.co.uk>
---
Pawel Zalewski (The Capable Hub) (9):
      ACPI: use a named initializer for acpi_device_id
      ACPI: drop unused assignment of acpi_device_id::driver_data
      ACPI: pci: drop unused assignment of acpi_device_id::driver_data
      ACPI: ghes-nvidia: use a named initializer for acpi_device_id::id
      ACPI: amba: drop unused assignment of acpi_device_id::driver_data
      ACPI: dptf: drop unused assignment of acpi_device_id::driver_data
      ACPI: nfit: core: drop unused assignment of acpi_device_id::driver_data
      ACPI: x86: use a named initializer for acpi_device_id::id
      ACPI: use a named initializer for acpi_device_id::id

 drivers/acpi/ac.c                 |   4 +-
 drivers/acpi/acpi_apd.c           |  42 ++--
 drivers/acpi/acpi_memhotplug.c    |   4 +-
 drivers/acpi/acpi_pad.c           |   4 +-
 drivers/acpi/acpi_platform.c      |  13 +-
 drivers/acpi/acpi_pnp.c           | 514 +++++++++++++++++++-------------------
 drivers/acpi/acpi_processor.c     |   8 +-
 drivers/acpi/acpi_tad.c           |   4 +-
 drivers/acpi/acpi_video.c         |   2 +-
 drivers/acpi/apei/ghes-nvidia.c   |   2 +-
 drivers/acpi/arm64/amba.c         |   6 +-
 drivers/acpi/battery.c            |   8 +-
 drivers/acpi/button.c             |  12 +-
 drivers/acpi/container.c          |   8 +-
 drivers/acpi/dptf/dptf_pch_fivr.c |  14 +-
 drivers/acpi/dptf/dptf_power.c    |  38 +--
 drivers/acpi/ec.c                 |   6 +-
 drivers/acpi/evged.c              |   4 +-
 drivers/acpi/fan_core.c           |   2 +-
 drivers/acpi/hed.c                |   4 +-
 drivers/acpi/nfit/core.c          |   4 +-
 drivers/acpi/pci_link.c           |   4 +-
 drivers/acpi/pci_root.c           |   4 +-
 drivers/acpi/pfr_telemetry.c      |   4 +-
 drivers/acpi/pfr_update.c         |   4 +-
 drivers/acpi/processor_driver.c   |   6 +-
 drivers/acpi/sbs.c                |   4 +-
 drivers/acpi/sbshc.c              |   6 +-
 drivers/acpi/scan.c               |  46 ++--
 drivers/acpi/thermal.c            |   4 +-
 drivers/acpi/tiny-power-button.c  |   6 +-
 drivers/acpi/video_detect.c       |   4 +-
 drivers/acpi/x86/cmos_rtc.c       |   2 +-
 drivers/acpi/x86/lpss.c           |  54 ++--
 drivers/acpi/x86/s2idle.c         |  14 +-
 drivers/acpi/x86/utils.c          |  16 +-
 include/linux/acpi.h              |   8 +-
 37 files changed, 443 insertions(+), 446 deletions(-)
---
base-commit: 48a5a7ab8d6ab7090564339e039c421f315de912
change-id: 20260724-acpi-refactor-f4efc2f44203

Best regards,
--  
Pawel Zalewski (The Capable Hub) <pzalewski@thegoodpenguin.co.uk>


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

end of thread, other threads:[~2026-07-27 12:17 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-27 12:10 [PATCH 0/9] ACPI: use named initializers for acpi_device_id Pawel Zalewski (The Capable Hub)
2026-07-27 12:10 ` [PATCH 1/9] ACPI: use a named initializer " Pawel Zalewski (The Capable Hub)
2026-07-27 12:17   ` sashiko-bot
2026-07-27 12:10 ` [PATCH 2/9] ACPI: drop unused assignment of acpi_device_id::driver_data Pawel Zalewski (The Capable Hub)
2026-07-27 12:17   ` sashiko-bot
2026-07-27 12:10 ` [PATCH 3/9] ACPI: pci: " Pawel Zalewski (The Capable Hub)
2026-07-27 12:16   ` sashiko-bot
2026-07-27 12:10 ` [PATCH 4/9] ACPI: ghes-nvidia: use a named initializer for acpi_device_id::id Pawel Zalewski (The Capable Hub)
2026-07-27 12:14   ` sashiko-bot
2026-07-27 12:10 ` [PATCH 5/9] ACPI: amba: drop unused assignment of acpi_device_id::driver_data Pawel Zalewski (The Capable Hub)
2026-07-27 12:16   ` sashiko-bot
2026-07-27 12:10 ` [PATCH 6/9] ACPI: dptf: " Pawel Zalewski (The Capable Hub)
2026-07-27 12:14   ` sashiko-bot
2026-07-27 12:10 ` [PATCH 7/9] ACPI: nfit: core: " Pawel Zalewski (The Capable Hub)
2026-07-27 12:15   ` sashiko-bot
2026-07-27 12:10 ` [PATCH 8/9] ACPI: x86: use a named initializer for acpi_device_id::id Pawel Zalewski (The Capable Hub)
2026-07-27 12:15   ` sashiko-bot
2026-07-27 12:10 ` [PATCH 9/9] ACPI: " Pawel Zalewski (The Capable Hub)
2026-07-27 12:17   ` sashiko-bot
2026-07-27 12:15 ` [PATCH 0/9] ACPI: use named initializers for acpi_device_id Rafael J. Wysocki (Intel)

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.