RE: [PATCH v2] edac: Consistently define pci_device_ids using named initializers

From: Zhuo, Qiuxu

Date: Wed May 27 2026 - 10:59:32 EST


> From: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@xxxxxxxxxxxx>
> Sent: Wednesday, May 27, 2026 2:11 PM
> To: Borislav Petkov <bp@xxxxxxxxx>; Luck, Tony <tony.luck@xxxxxxxxx>
> Cc: Mark Gross <markgross@xxxxxxxxxx>; Arvind R. <arvino55@xxxxxxxxx>;
> Jason Baron <jbaron@xxxxxxxxxx>; Zhuo, Qiuxu <qiuxu.zhuo@xxxxxxxxx>;
> linux-edac@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; Markus Schneider-
> Pargmann <msp@xxxxxxxxxxxx>
> Subject: [PATCH v2] 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 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@xxxxxxxxxxxx/)
> 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.
>
> Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-
> koenig@xxxxxxxxxxxx>
> ---
> Hello,
>
> changes since implicit v1
> (https://lore.kernel.org/all/20260429152513.3755034-2-u.kleine-
> koenig@xxxxxxxxxxxx):
>
> - Rebase to next-20260526 to fix a conflict in drivers/edac/igen6_edac.c
>
> Borislav Petkov asked me to do a patch for drivers/edac/igen6_edac.c only on
> top of next, but I hope this way it's still easier.
>

The patch LGTM.

Reviewed-by: Qiuxu Zhuo <qiuxu.zhuo@xxxxxxxxx>

For igen6_edac and ie31200_edac drivers:

Tested on Intel Panther Lake-H (igen6_edac) and Intel Raptor Lake-S (Ie31200_edac).
PCI IDs were correctly matched and drivers probed successfully.

Tested-by: Qiuxu Zhuo <qiuxu.zhuo@xxxxxxxxx>