linux/drivers/net/ethernet/chelsio/cxgb
Uwe Kleine-König (The Capable Hub) 733334d6bd net: Consistently define pci_device_ids using named initializers
... and PCI device helpers.

The various struct pci_device_id arrays were initialized mostly by one
the PCI_DEVICE macros and then list expressions. The latter isn't easily
readable if you're not into PCI. Using named initializers is more
explicit and thus easier to parse.

Also use PCI_DEVICE* helper macros to assign .vendor, .device,
.subvendor and .subdevice where appropriate and skip explicit
assignments of 0 (which the compiler takes care of).

The secret plan is to make struct pci_device_id::driver_data an
anonymous union (similar to
https://lore.kernel.org/all/cover.1776579304.git.u.kleine-koenig@baylibre.com/)
and that requires named initializers. But it's also a nice cleanup on
its own.

This change doesn't introduce changes to the compiled pci_device_id
arrays. Tested on x86 and arm64.

Reviewed-by: Jijie Shao <shaojijie@huawei.com>
Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: Petr Machata <petrm@nvidia.com> # for mlxsw
Acked-by: Jacob Keller <jacob.e.keller@intel.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Forwarded: id:76da4f44d48bdde84580963862bf9616bee5c9e9.1778149923.git.u.kleine-koenig@baylibre.com (v2)
Reviewed-by: Michael Grzeschik <mgr@kernel.org>
Link: https://patch.msgid.link/20260511090023.1634387-6-u.kleine-koenig@baylibre.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-05-12 18:16:34 -07:00
..
common.h net: Consistently define pci_device_ids using named initializers 2026-05-12 18:16:34 -07:00
cphy.h treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_292.RULE 2022-06-10 14:51:36 +02:00
cpl5_cmd.h treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_292.RULE 2022-06-10 14:51:36 +02:00
cxgb2.c net: ethtool: Adjust exactly ETH_GSTRING_LEN-long stats to use memcpy 2025-04-17 18:53:52 -07:00
elmer0.h treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_292.RULE 2022-06-10 14:51:36 +02:00
espi.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
espi.h treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_292.RULE 2022-06-10 14:51:36 +02:00
fpga_defs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
gmac.h treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_292.RULE 2022-06-10 14:51:36 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
mv88e1xxx.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
mv88e1xxx.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mv88x201x.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
my3126.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
pm3393.c net: Fix typos 2025-07-25 10:29:07 -07:00
regs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_292.RULE 2022-06-10 14:51:36 +02:00
sge.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
sge.h treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_292.RULE 2022-06-10 14:51:36 +02:00
subr.c net: Consistently define pci_device_ids using named initializers 2026-05-12 18:16:34 -07:00
suni1x10gexp_regs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_292.RULE 2022-06-10 14:51:36 +02:00
tp.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
tp.h cxgb: Remove unused declarations 2024-09-03 13:07:27 +02:00
vsc7326_reg.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vsc7326.c ethernet: constify references to netdev->dev_addr in drivers 2021-10-14 09:22:11 -07:00