From: "Enrico Weigelt, metux IT consult" <info@metux.net>
To: linux-kernel@vger.kernel.org
Cc: khalid@gonehiking.org, jejb@linux.ibm.com,
martin.petersen@oracle.com, aacraid@microsemi.com,
linux-scsi@vger.kernel.org
Subject: [PATCH v2] drivers: scsi: remove unnecessary #ifdef MODULE
Date: Thu, 6 Jun 2019 17:04:31 +0200 [thread overview]
Message-ID: <1559833471-30534-1-git-send-email-info@metux.net> (raw)
From: Enrico Weigelt <info@metux.net>
The MODULE_DEVICE_TABLE() macro already checks for MODULE defined,
so the extra check here is not necessary.
Changes v2:
* make dptids const to fix warning on unused variable
Signed-off-by: Enrico Weigelt <info@metux.net>
---
drivers/scsi/BusLogic.c | 2 --
drivers/scsi/dpt_i2o.c | 5 +----
2 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/scsi/BusLogic.c b/drivers/scsi/BusLogic.c
index e41e51f..68cc68b 100644
--- a/drivers/scsi/BusLogic.c
+++ b/drivers/scsi/BusLogic.c
@@ -3893,7 +3893,6 @@ static void __exit blogic_exit(void)
__setup("BusLogic=", blogic_setup);
-#ifdef MODULE
/*static struct pci_device_id blogic_pci_tbl[] = {
{ PCI_VENDOR_ID_BUSLOGIC, PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
@@ -3909,7 +3908,6 @@ static void __exit blogic_exit(void)
{PCI_DEVICE(PCI_VENDOR_ID_BUSLOGIC, PCI_DEVICE_ID_BUSLOGIC_FLASHPOINT)},
{0, },
};
-#endif
MODULE_DEVICE_TABLE(pci, blogic_pci_tbl);
module_init(blogic_init);
diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c
index abc74fd..162d56a 100644
--- a/drivers/scsi/dpt_i2o.c
+++ b/drivers/scsi/dpt_i2o.c
@@ -177,14 +177,11 @@ static u8 adpt_read_blink_led(adpt_hba* host)
*============================================================================
*/
-#ifdef MODULE
-static struct pci_device_id dptids[] = {
+static const struct pci_device_id dptids[] = {
{ PCI_DPT_VENDOR_ID, PCI_DPT_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID,},
{ PCI_DPT_VENDOR_ID, PCI_DPT_RAPTOR_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID,},
{ 0, }
};
-#endif
-
MODULE_DEVICE_TABLE(pci,dptids);
static int adpt_detect(struct scsi_host_template* sht)
--
1.9.1
next reply other threads:[~2019-06-06 15:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-06 15:04 Enrico Weigelt, metux IT consult [this message]
2019-06-07 0:41 ` [PATCH v2] drivers: scsi: remove unnecessary #ifdef MODULE James Bottomley
2019-06-07 21:50 ` Enrico Weigelt, metux IT consult
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1559833471-30534-1-git-send-email-info@metux.net \
--to=info@metux.net \
--cc=aacraid@microsemi.com \
--cc=jejb@linux.ibm.com \
--cc=khalid@gonehiking.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).