Skip to content

Commit b88f88c

Browse files
legionusnathanchance
authored andcommitted
scsi: Always define blogic_pci_tbl structure
The blogic_pci_tbl structure is used by the MODULE_DEVICE_TABLE macro. There is no longer a need to protect it with the MODULE condition, since this no longer causes the compiler to warn about an unused variable. To avoid warnings when -Wunused-const-variable option is used, mark it as __maybe_unused for such configuration. Cc: Khalid Aziz <[email protected]> Cc: Martin K. Petersen <[email protected]> Cc: [email protected] Suggested-by: James Bottomley <[email protected]> Signed-off-by: Alexey Gladkov <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]> Reviewed-by: Damien Le Moal <[email protected]> Acked-by: Martin K. Petersen <[email protected]> Link: https://patch.msgid.link/fd8e30de07de79a4923ae967eaee5ba2f2fcef00.1758182101.git.legion@kernel.org Signed-off-by: Nathan Chancellor <[email protected]>
1 parent 39cfd5b commit b88f88c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/scsi/BusLogic.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3715,7 +3715,6 @@ static void __exit blogic_exit(void)
37153715

37163716
__setup("BusLogic=", blogic_setup);
37173717

3718-
#ifdef MODULE
37193718
/*static const struct pci_device_id blogic_pci_tbl[] = {
37203719
{ PCI_VENDOR_ID_BUSLOGIC, PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER,
37213720
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
@@ -3725,13 +3724,12 @@ __setup("BusLogic=", blogic_setup);
37253724
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
37263725
{ }
37273726
};*/
3728-
static const struct pci_device_id blogic_pci_tbl[] = {
3727+
static const struct pci_device_id blogic_pci_tbl[] __maybe_unused = {
37293728
{PCI_DEVICE(PCI_VENDOR_ID_BUSLOGIC, PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER)},
37303729
{PCI_DEVICE(PCI_VENDOR_ID_BUSLOGIC, PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER_NC)},
37313730
{PCI_DEVICE(PCI_VENDOR_ID_BUSLOGIC, PCI_DEVICE_ID_BUSLOGIC_FLASHPOINT)},
37323731
{0, },
37333732
};
3734-
#endif
37353733
MODULE_DEVICE_TABLE(pci, blogic_pci_tbl);
37363734

37373735
module_init(blogic_init);

0 commit comments

Comments
 (0)