Re: [PATCH 1/4] char: use named initializers for acpi_device_id

From: Arnd Bergmann

Date: Fri Aug 07 2026 - 08:33:42 EST


On Fri, Aug 7, 2026, at 13:26, Pawel Zalewski via B4 Relay wrote:
> From: "Pawel Zalewski (The Capable Hub)" <pzalewski@xxxxxxxxxxxxxxxxxxxx>
>
> Use a named initializer for the acpi_device_id fields which
> makes the code more readable and consistent with how lists
> are initialized in the rest of the kernel code base. Also
> drop explicitly setting fields to 0 where it is redundant.
>
> While we are at it - unify the list terminator to have
> a single space between the brackets and no trailing
> comma.
>
> Signed-off-by: Pawel Zalewski (The Capable Hub) <pzalewski@xxxxxxxxxxxxxxxxxxxx>

I don't think this is the right approach: I see around 1500 instances
of acpi_device_id data with plain initializers and only about 50
with named ones. Converting all of them seems like a lot of
extra work, and I'm fairly sure you can just change the
driver_data to an anonymous union without this.

Arnd