diff options
author | 2024-12-07 17:48:28 +0100 | |
---|---|---|
committer | 2024-12-09 21:59:52 -0500 | |
commit | c9a71ca13f71bf0d32664a1e7d1f00378811d59c (patch) | |
tree | 1d6fff032b08e5caa9b0623b2037978a017e9640 /drivers/scsi/fdomain_pci.c | |
parent | scsi: storvsc: Don't assume cpu_possible_mask is dense (diff) | |
download | linux-rng-c9a71ca13f71bf0d32664a1e7d1f00378811d59c.tar.xz linux-rng-c9a71ca13f71bf0d32664a1e7d1f00378811d59c.zip |
scsi: Constify struct pci_device_id
'struct pci_device_id' is not modified in these drivers.
Constifying this structure moves some data to a read-only section, so
increase overall security.
On a x86_64, with allmodconfig, as an example:
Before:
======
text data bss dec hex filename
70237 9137 320 79694 1374e drivers/scsi/3w-9xxx.o
After:
=====
text data bss dec hex filename
70461 8913 320 79694 1374e drivers/scsi/3w-9xxx.o
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/fc61b1946488c1ea8f7a17a06cf40fbd05dcc6de.1733590049.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/fdomain_pci.c')
-rw-r--r-- | drivers/scsi/fdomain_pci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/fdomain_pci.c b/drivers/scsi/fdomain_pci.c index 3e05ce7b89e5..c15b2ce76e9f 100644 --- a/drivers/scsi/fdomain_pci.c +++ b/drivers/scsi/fdomain_pci.c @@ -47,7 +47,7 @@ static void fdomain_pci_remove(struct pci_dev *pdev) pci_disable_device(pdev); } -static struct pci_device_id fdomain_pci_table[] = { +static const struct pci_device_id fdomain_pci_table[] = { { PCI_DEVICE(PCI_VENDOR_ID_FD, PCI_DEVICE_ID_FD_36C70) }, {} }; |