[PATCH] gpio: amd8111: Drop useless zeros in array initialisation

From: Uwe Kleine-König (The Capable Hub)

Date: Wed May 06 2026 - 10:50:22 EST


The compiler fills in zeros as needed, so there is no technical reason
to add explicit zeros at the end of a list initializer. Drop them.

Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@xxxxxxxxxxxx>
---
Hello,

I'm currently cleaning up lots of pci_device_id tables to not use list
initializers. This one is a bit of an outlier because for my next patch
quest I need only named initializers for .driver_data, so I don't really
*need* this patch in. But this first array member's 0 in the original
code initializes .class. It's very unusual to assign .class but not
.class_mask, so I guess this was a mistake (without consequences).
(Named initializers are great!)

Best regards
UWe


drivers/gpio/gpio-amd8111.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpio/gpio-amd8111.c b/drivers/gpio/gpio-amd8111.c
index 15fd5e210d74..8078b5d7b80c 100644
--- a/drivers/gpio/gpio-amd8111.c
+++ b/drivers/gpio/gpio-amd8111.c
@@ -59,8 +59,8 @@
* want to register another driver on the same PCI id.
*/
static const struct pci_device_id pci_tbl[] = {
- { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8111_SMBUS), 0 },
- { 0, }, /* terminate list */
+ { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8111_SMBUS) },
+ { }, /* terminate list */
};
MODULE_DEVICE_TABLE(pci, pci_tbl);


base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731
--
2.47.3