[PATCH] crypto: Drop explicit assigment of 0 in pci_device_id array

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

Date: Mon May 04 2026 - 11:33:05 EST


Assigning .driver_data for drivers that don't use this struct member is
just noise that can better be dropped. The same applies for an explicit
zero in the terminating entry. Drop these.

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

this is a preparing change for making struct pci_device_id::driver_data an
anonymous union (similar to
https://lore.kernel.org/all/cover.1776579304.git.u.kleine-koenig@xxxxxxxxxxxx/).
This requires named initializers for .driver_data, but dropping unused
assignments is still better and a nice cleanup on its own.

Best regards
Uwe

drivers/crypto/cavium/cpt/cptvf_main.c | 4 ++--
drivers/crypto/cavium/nitrox/nitrox_main.c | 4 ++--
drivers/crypto/marvell/octeontx/otx_cptvf_main.c | 4 ++--
drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c | 6 +++---
4 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/crypto/cavium/cpt/cptvf_main.c b/drivers/crypto/cavium/cpt/cptvf_main.c
index 2c9a2af38876..6af2650b1ebe 100644
--- a/drivers/crypto/cavium/cpt/cptvf_main.c
+++ b/drivers/crypto/cavium/cpt/cptvf_main.c
@@ -835,8 +835,8 @@ static void cptvf_shutdown(struct pci_dev *pdev)

/* Supported devices */
static const struct pci_device_id cptvf_id_table[] = {
- {PCI_VDEVICE(CAVIUM, CPT_81XX_PCI_VF_DEVICE_ID), 0},
- { 0, } /* end of table */
+ { PCI_VDEVICE(CAVIUM, CPT_81XX_PCI_VF_DEVICE_ID) },
+ { } /* end of table */
};

static struct pci_driver cptvf_pci_driver = {
diff --git a/drivers/crypto/cavium/nitrox/nitrox_main.c b/drivers/crypto/cavium/nitrox/nitrox_main.c
index 8664d97261fe..e474c84d8d38 100644
--- a/drivers/crypto/cavium/nitrox/nitrox_main.c
+++ b/drivers/crypto/cavium/nitrox/nitrox_main.c
@@ -38,9 +38,9 @@ static unsigned int num_devices;
* nitrox_pci_tbl - PCI Device ID Table
*/
static const struct pci_device_id nitrox_pci_tbl[] = {
- {PCI_VDEVICE(CAVIUM, CNN55XX_DEV_ID), 0},
+ { PCI_VDEVICE(CAVIUM, CNN55XX_DEV_ID) },
/* required last entry */
- {0, }
+ { }
};
MODULE_DEVICE_TABLE(pci, nitrox_pci_tbl);

diff --git a/drivers/crypto/marvell/octeontx/otx_cptvf_main.c b/drivers/crypto/marvell/octeontx/otx_cptvf_main.c
index 587609db6c69..5cc5c84069a9 100644
--- a/drivers/crypto/marvell/octeontx/otx_cptvf_main.c
+++ b/drivers/crypto/marvell/octeontx/otx_cptvf_main.c
@@ -957,8 +957,8 @@ static void otx_cptvf_remove(struct pci_dev *pdev)

/* Supported devices */
static const struct pci_device_id otx_cptvf_id_table[] = {
- {PCI_VDEVICE(CAVIUM, OTX_CPT_PCI_VF_DEVICE_ID), 0},
- { 0, } /* end of table */
+ { PCI_VDEVICE(CAVIUM, OTX_CPT_PCI_VF_DEVICE_ID) },
+ { } /* end of table */
};

static struct pci_driver otx_cptvf_pci_driver = {
diff --git a/drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c b/drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c
index 858f851c9c8a..62b08116f808 100644
--- a/drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c
+++ b/drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c
@@ -460,9 +460,9 @@ static void otx2_cptvf_remove(struct pci_dev *pdev)

/* Supported devices */
static const struct pci_device_id otx2_cptvf_id_table[] = {
- {PCI_VDEVICE(CAVIUM, OTX2_CPT_PCI_VF_DEVICE_ID), 0},
- {PCI_VDEVICE(CAVIUM, CN10K_CPT_PCI_VF_DEVICE_ID), 0},
- { 0, } /* end of table */
+ { PCI_VDEVICE(CAVIUM, OTX2_CPT_PCI_VF_DEVICE_ID) },
+ { PCI_VDEVICE(CAVIUM, CN10K_CPT_PCI_VF_DEVICE_ID) },
+ { } /* end of table */
};

static struct pci_driver otx2_cptvf_pci_driver = {

base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731
--
2.47.3