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

Configure Feed

Select the types of activity you want to include in your feed.

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 <khalid@gonehiking.org>
Cc: Martin K. Petersen <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org
Suggested-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Alexey Gladkov <legion@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Acked-by: Martin K. Petersen <martin.petersen@oracle.com>
Link: https://patch.msgid.link/fd8e30de07de79a4923ae967eaee5ba2f2fcef00.1758182101.git.legion@kernel.org
Signed-off-by: Nathan Chancellor <nathan@kernel.org>

authored by

Alexey Gladkov and committed by
Nathan Chancellor
b88f88c2 39cfd5b1

+1 -3
+1 -3
drivers/scsi/BusLogic.c
··· 3715 3715 3716 3716 __setup("BusLogic=", blogic_setup); 3717 3717 3718 - #ifdef MODULE 3719 3718 /*static const struct pci_device_id blogic_pci_tbl[] = { 3720 3719 { PCI_VENDOR_ID_BUSLOGIC, PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER, 3721 3720 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, ··· 3724 3725 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, 3725 3726 { } 3726 3727 };*/ 3727 - static const struct pci_device_id blogic_pci_tbl[] = { 3728 + static const struct pci_device_id blogic_pci_tbl[] __maybe_unused = { 3728 3729 {PCI_DEVICE(PCI_VENDOR_ID_BUSLOGIC, PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER)}, 3729 3730 {PCI_DEVICE(PCI_VENDOR_ID_BUSLOGIC, PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER_NC)}, 3730 3731 {PCI_DEVICE(PCI_VENDOR_ID_BUSLOGIC, PCI_DEVICE_ID_BUSLOGIC_FLASHPOINT)}, 3731 3732 {0, }, 3732 3733 }; 3733 - #endif 3734 3734 MODULE_DEVICE_TABLE(pci, blogic_pci_tbl); 3735 3735 3736 3736 module_init(blogic_init);