On Mon, Jul 27, 2026 at 2:10 PM Pawel Zalewski (The Capable Hub)
<[email protected]> wrote:
>
> 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/[email protected]/
>
> Signed-off-by: Pawel Zalewski (The Capable Hub) 
> <[email protected]>
> ---
> 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(-)
> ---

So we can talk about this after 7.3-rc1 is out.

Thanks!

Reply via email to