]> git.hungrycats.org Git - linux/commit
ata: Use named initializers for pci_device_id arrays
authorUwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Fri, 12 Jun 2026 08:21:48 +0000 (10:21 +0200)
committerNiklas Cassel <cassel@kernel.org>
Fri, 12 Jun 2026 09:44:30 +0000 (11:44 +0200)
commit21e7b9710a24bd7688c02f136923c89bee2fda5a
tree0262c6682ad21a171b351462e11579204cd262d6
parent3b5b35f28e6e05acc0edb5fe0641317f6fc628c1
ata: Use named initializers for pci_device_id arrays

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.

Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Signed-off-by: Niklas Cassel <cassel@kernel.org>
25 files changed:
drivers/ata/acard-ahci.c
drivers/ata/ahci.c
drivers/ata/ata_piix.c
drivers/ata/pata_acpi.c
drivers/ata/pata_amd.c
drivers/ata/pata_artop.c
drivers/ata/pata_cmd64x.c
drivers/ata/pata_opti.c
drivers/ata/pata_pdc2027x.c
drivers/ata/pata_pdc202xx_old.c
drivers/ata/pata_serverworks.c
drivers/ata/pata_sis.c
drivers/ata/pata_via.c
drivers/ata/pdc_adma.c
drivers/ata/sata_mv.c
drivers/ata/sata_nv.c
drivers/ata/sata_promise.c
drivers/ata/sata_qstor.c
drivers/ata/sata_sil.c
drivers/ata/sata_sil24.c
drivers/ata/sata_sis.c
drivers/ata/sata_svw.c
drivers/ata/sata_sx4.c
drivers/ata/sata_uli.c
drivers/ata/sata_via.c