From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: drm/amdgpu: Consistently define pci_device_ids using named initializers Date: Tue, 05 May 2026 11:20:07 +1000 Message-ID: In-Reply-To: <20260429171644.8406-2-u.kleine-koenig@baylibre.com> References: <20260429171644.8406-2-u.kleine-koenig@baylibre.com> <20260429171644.8406-2-u.kleine-koenig@baylibre.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review **Correctness of the transformation:** The old form: ```c {0x1002, 0x6780, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TAHITI}, ``` maps to `struct pci_device_id` fields: `.vendor=3D0x1002, .device=3D0x6780,= .subvendor=3DPCI_ANY_ID, .subdevice=3DPCI_ANY_ID, .class=3D0, .class_mask= =3D0, .driver_data=3DCHIP_TAHITI`. The new form: ```c { PCI_DEVICE(0x1002, 0x6780), .driver_data =3D CHIP_TAHITI }, ``` `PCI_DEVICE()` expands (`include/linux/pci.h:1052-1054`) to: ```c .vendor =3D (vend), .device =3D (dev), .subvendor =3D PCI_ANY_ID, .subdevic= e =3D PCI_ANY_ID ``` The remaining fields (`.class`, `.class_mask`, `.override_only`) are implic= itly zero-initialized. This is semantically identical. **Sentinel entry:** The change from `{0, 0, 0}` to `{ }` is correct =E2=80=94 both produce a fu= lly zeroed `struct pci_device_id`, which is the expected terminator for `MO= DULE_DEVICE_TABLE`. **Consistency with existing code:** The table already had entries using named initializers for the class-match = CHIP_IP_DISCOVERY entries: ```c { PCI_DEVICE(0x1002, PCI_ANY_ID), .class =3D PCI_CLASS_DISPLAY_VGA << 8, .class_mask =3D 0xffffff, .driver_data =3D CHIP_IP_DISCOVERY }, ``` These were left untouched. The patch makes the rest of the table match this= style. **Spot-checked entries:** Verified several entries across different chip fa= milies (TAHITI, PITCAIRN with AMD_IS_MOBILITY flags, KAVERI with AMD_IS_MOB= ILITY|AMD_IS_APU, etc.) =E2=80=94 all PCI IDs and driver_data values are pr= eserved exactly. **The 309-line insertion / 309-line deletion count** confirms a clean 1:1 l= ine mapping with no entries added or removed. **No issues found.** The patch is a clean mechanical transformation with go= od motivation (readability + preparation for the `driver_data` anonymous un= ion work referenced in the cover letter). --- Generated by Claude Code Patch Reviewer