Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

cxgb4/cxgb4vf/csiostor: Make PCI Device ID Tables be "const"

Make PCI Device ID Tables be "const" to move them out of the data segment and
remove a redundant check on CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN in
t4_pci_id_tbl.h to guard the contents of the include file.

Signed-off-by: Casey Leedom <leedom@chelsio.com>
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Hariprasad Shenai and committed by
David S. Miller
768ffc66 933e0db1

+3 -7
+1 -1
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
··· 124 124 /* Macros needed to support the PCI Device ID Table ... 125 125 */ 126 126 #define CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN \ 127 - static struct pci_device_id cxgb4_pci_tbl[] = { 127 + static const struct pci_device_id cxgb4_pci_tbl[] = { 128 128 #define CH_PCI_DEVICE_ID_FUNCTION 0x4 129 129 130 130 /* Include PCI Device IDs for both PF4 and PF0-3 so our PCI probe() routine is
-4
drivers/net/ethernet/chelsio/cxgb4/t4_pci_id_tbl.h
··· 60 60 * -- Used to finish the definition of the PCI ID Table. Note that we 61 61 * -- will be adding a trailing semi-colon (";") here. 62 62 */ 63 - #ifdef CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN 64 - 65 63 #ifndef CH_PCI_DEVICE_ID_FUNCTION 66 64 #error CH_PCI_DEVICE_ID_FUNCTION not defined! 67 65 #endif ··· 154 156 CH_PCI_ID_TABLE_FENTRY(0x5089), /* Custom T520-CR */ 155 157 CH_PCI_ID_TABLE_FENTRY(0x5090), /* Custom T540-CR */ 156 158 CH_PCI_DEVICE_ID_TABLE_DEFINE_END; 157 - 158 - #endif /* CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN */ 159 159 160 160 #endif /* __T4_PCI_ID_TBL_H__ */
+1 -1
drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
··· 3034 3034 /* Macros needed to support the PCI Device ID Table ... 3035 3035 */ 3036 3036 #define CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN \ 3037 - static struct pci_device_id cxgb4vf_pci_tbl[] = { 3037 + static const struct pci_device_id cxgb4vf_pci_tbl[] = { 3038 3038 #define CH_PCI_DEVICE_ID_FUNCTION 0x8 3039 3039 3040 3040 #define CH_PCI_ID_TABLE_ENTRY(devid) \
+1 -1
drivers/scsi/csiostor/csio_init.c
··· 1172 1172 * Macros needed to support the PCI Device ID Table ... 1173 1173 */ 1174 1174 #define CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN \ 1175 - static struct pci_device_id csio_pci_tbl[] = { 1175 + static const struct pci_device_id csio_pci_tbl[] = { 1176 1176 /* Define for FCoE uses PF6 */ 1177 1177 #define CH_PCI_DEVICE_ID_FUNCTION 0x6 1178 1178