From: Uwe Kleine-König (The Capable Hub) Date: Mon, 4 May 2026 09:20:14 +0000 (+0200) Subject: hwrng: drivers - Drop unused assignment to pci driver_data X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=69f93dbb40377edc4c4bf3fc67bbd63ba35fde3d;p=thirdparty%2Flinux.git hwrng: drivers - Drop unused assignment to pci driver_data Explicitly assigning 0 to driver_data in drivers not using this member has no benefit. Drop these and similarly depend on the compiler to zero-initialize the list terminator. This is a preparation for making struct pci_device_id::driver_data an anonymous union (which makes initializing using a list expression fail), but it's also a nice cleanup by itself. It was verified on x86 and arm64 that this change doesn't introduce changes to the compiled drivers. Signed-off-by: Uwe Kleine-König (The Capable Hub) Signed-off-by: Herbert Xu --- diff --git a/drivers/char/hw_random/amd-rng.c b/drivers/char/hw_random/amd-rng.c index 332d594bdf709..dff80daae5877 100644 --- a/drivers/char/hw_random/amd-rng.c +++ b/drivers/char/hw_random/amd-rng.c @@ -47,9 +47,9 @@ * want to register another driver on the same PCI id. */ static const struct pci_device_id pci_tbl[] = { - { PCI_VDEVICE(AMD, 0x7443), 0, }, - { PCI_VDEVICE(AMD, 0x746b), 0, }, - { 0, }, /* terminate list */ + { PCI_VDEVICE(AMD, 0x7443) }, + { PCI_VDEVICE(AMD, 0x746b) }, + { } /* terminate list */ }; MODULE_DEVICE_TABLE(pci, pci_tbl); diff --git a/drivers/char/hw_random/cavium-rng.c b/drivers/char/hw_random/cavium-rng.c index d9d7b6038c065..3e2c042009f66 100644 --- a/drivers/char/hw_random/cavium-rng.c +++ b/drivers/char/hw_random/cavium-rng.c @@ -73,8 +73,8 @@ static void cavium_rng_remove(struct pci_dev *pdev) } static const struct pci_device_id cavium_rng_pf_id_table[] = { - { PCI_DEVICE(PCI_VENDOR_ID_CAVIUM, 0xa018), 0, 0, 0}, /* Thunder RNM */ - {0,}, + { PCI_DEVICE(PCI_VENDOR_ID_CAVIUM, 0xa018) }, /* Thunder RNM */ + { }, }; MODULE_DEVICE_TABLE(pci, cavium_rng_pf_id_table); diff --git a/drivers/char/hw_random/geode-rng.c b/drivers/char/hw_random/geode-rng.c index 1b21d58e1768e..ae63eff643448 100644 --- a/drivers/char/hw_random/geode-rng.c +++ b/drivers/char/hw_random/geode-rng.c @@ -46,8 +46,8 @@ * want to register another driver on the same PCI id. */ static const struct pci_device_id pci_tbl[] = { - { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_LX_AES), 0, }, - { 0, }, /* terminate list */ + { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_LX_AES) }, + { } /* terminate list */ }; MODULE_DEVICE_TABLE(pci, pci_tbl);