lkml.org 
[lkml]   [2019]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH 2/3] drivers: scsi: remove unnecessary #ifdef MODULE
Date


> -----Original Message-----
> From: linux-kernel-owner@vger.kernel.org <linux-kernel-
> owner@vger.kernel.org> On Behalf Of Enrico Weigelt, metux IT consult
> Sent: Saturday, June 01, 2019 9:02 AM
> Subject: [PATCH 2/3] drivers: scsi: remove unnecessary #ifdef MODULE
>
> The MODULE_DEVICE_TABLE() macro already checks for MODULE defined,
> so the extra check here is not necessary.
>
...
> diff --git a/drivers/scsi/BusLogic.c b/drivers/scsi/BusLogic.c
...
>
> -#ifdef MODULE
> static 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);

I don't see any reply to James' comment that these changes result in
static struct definitions that are unused, which should result in
complaints by the compiler like:
warning: 'dptids' defined by not used [-Wunused-variable]


\
 
 \ /
  Last update: 2019-06-01 17:41    [W:0.107 / U:4.928 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site