Re: [PATCH v3 2/2] ata: Use named initializers for pci_device_id arrays

From: Damien Le Moal

Date: Fri Jun 12 2026 - 07:55:08 EST


On 6/12/26 17:21, Uwe Kleine-König (The Capable Hub) wrote:
> While being less compact, using named initializers allows to more easily
> see which members of the structs are assigned which value without having
> to lookup the declaration of the struct. And it's also more robust
> against changes to the struct definition.
>
> The mentioned robustness is relevant for a planned change to struct
> pci_device_id that replaces .driver_data by an anonymous union.
>
> Also drop the comma after a few list terminators.
>
> This patch doesn't modify the compiled array, only their representation
> in source form benefits. The former was confirmed with x86 and arm64
> builds.
>
> Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@xxxxxxxxxxxx>

Nice !

Reviewed-by: Damien Le Moal <dlemoal@xxxxxxxxxx>

--
Damien Le Moal
Western Digital Research