]> git.hungrycats.org Git - linux/commit
EDAC: Consistently define pci_device_ids using named initializers
authorUwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Wed, 27 May 2026 06:10:56 +0000 (08:10 +0200)
committerTony Luck <tony.luck@intel.com>
Fri, 29 May 2026 20:28:36 +0000 (13:28 -0700)
commit78d86a71de6ea70c6228e7817f3962c618c1eb54
treef269102d7b93cbfbfe539b685a97cf4a62d27726
parent96780b953bac89bc624c3bf326a090f069d8d277
EDAC: Consistently define pci_device_ids using named initializers

... and PCI device helpers.

The various struct pci_device_id arrays were initialized mostly by one of the
PCI_DEVICE macros and then list expressions. The latter aren'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.

  [ bp: Massage commit message. ]

Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Reviewed-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Tested-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Link: https://patch.msgid.link/20260527061057.3796383-2-u.kleine-koenig@baylibre.com
12 files changed:
drivers/edac/amd76x_edac.c
drivers/edac/e752x_edac.c
drivers/edac/e7xxx_edac.c
drivers/edac/edac_mc.h
drivers/edac/i3000_edac.c
drivers/edac/i3200_edac.c
drivers/edac/i82860_edac.c
drivers/edac/i82875p_edac.c
drivers/edac/i82975x_edac.c
drivers/edac/ie31200_edac.c
drivers/edac/igen6_edac.c
drivers/edac/x38_edac.c