diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2024-12-07 17:48:28 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2024-12-10 03:59:52 +0100 |
commit | c9a71ca13f71bf0d32664a1e7d1f00378811d59c (patch) | |
tree | 1d6fff032b08e5caa9b0623b2037978a017e9640 /drivers/scsi/stex.c | |
parent | scsi: storvsc: Don't assume cpu_possible_mask is dense (diff) | |
download | linux-c9a71ca13f71bf0d32664a1e7d1f00378811d59c.tar.xz linux-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/stex.c')
-rw-r--r-- | drivers/scsi/stex.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/stex.c b/drivers/scsi/stex.c index 0e5c7609dcc4..63ed7f9aaa93 100644 --- a/drivers/scsi/stex.c +++ b/drivers/scsi/stex.c @@ -1488,7 +1488,7 @@ static const struct scsi_host_template driver_template = { .dma_boundary = PAGE_SIZE - 1, }; -static struct pci_device_id stex_pci_tbl[] = { +static const struct pci_device_id stex_pci_tbl[] = { /* st_shasta */ { 0x105a, 0x8350, PCI_ANY_ID, PCI_ANY_ID, 0, 0, st_shasta }, /* SuperTrak EX8350/8300/16350/16300 */ |