linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* remove unneeded #ifdef MODULE
@ 2019-06-01 14:01 Enrico Weigelt, metux IT consult
  2019-06-01 14:01 ` [PATCH 1/3] drivers: cpufreq: cpufreq-nforce2: remove unnecessary " Enrico Weigelt, metux IT consult
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2019-06-01 14:01 UTC (permalink / raw)
  To: linux-kernel
  Cc: rjw, viresh.kumar, jdelvare, linux, khalid, jejb,
	martin.petersen, aacraid, linux-pm, linux-hwmon, linux-scsi

Hi folks,

here're some patches that remove some (IMHO) unncessary cases of #ifdef MODULE
These basically switch off calls to MODULE_DEVICE_TABLE() macro, which already
checks for MODULE symbol on its own.

have fun
--mtx 


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 1/3] drivers: cpufreq: cpufreq-nforce2: remove unnecessary #ifdef MODULE
  2019-06-01 14:01 remove unneeded #ifdef MODULE Enrico Weigelt, metux IT consult
@ 2019-06-01 14:01 ` Enrico Weigelt, metux IT consult
  2019-06-01 14:01 ` [PATCH 2/3] drivers: scsi: " Enrico Weigelt, metux IT consult
  2019-06-01 14:01 ` [PATCH 3/3] drivers: hwmon: i5k_amb: " Enrico Weigelt, metux IT consult
  2 siblings, 0 replies; 11+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2019-06-01 14:01 UTC (permalink / raw)
  To: linux-kernel
  Cc: rjw, viresh.kumar, jdelvare, linux, khalid, jejb,
	martin.petersen, aacraid, linux-pm, linux-hwmon, linux-scsi

The MODULE_DEVICE_TABLE() macro already checks for MODULE defined,
so the extra check here is not necessary.

Signed-off-by: Enrico Weigelt <info@metux.net>
---
 drivers/cpufreq/cpufreq-nforce2.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/cpufreq/cpufreq-nforce2.c b/drivers/cpufreq/cpufreq-nforce2.c
index cd53272..6dd1827 100644
--- a/drivers/cpufreq/cpufreq-nforce2.c
+++ b/drivers/cpufreq/cpufreq-nforce2.c
@@ -374,13 +374,11 @@ static int nforce2_cpu_exit(struct cpufreq_policy *policy)
 	.exit = nforce2_cpu_exit,
 };
 
-#ifdef MODULE
 static const struct pci_device_id nforce2_ids[] = {
 	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2 },
 	{}
 };
 MODULE_DEVICE_TABLE(pci, nforce2_ids);
-#endif
 
 /**
  * nforce2_detect_chipset - detect the Southbridge which contains FSB PLL logic
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/3] drivers: scsi: remove unnecessary #ifdef MODULE
  2019-06-01 14:01 remove unneeded #ifdef MODULE Enrico Weigelt, metux IT consult
  2019-06-01 14:01 ` [PATCH 1/3] drivers: cpufreq: cpufreq-nforce2: remove unnecessary " Enrico Weigelt, metux IT consult
@ 2019-06-01 14:01 ` Enrico Weigelt, metux IT consult
  2019-06-01 15:40   ` Elliott, Robert (Servers)
  2019-06-03 16:46   ` Khalid Aziz
  2019-06-01 14:01 ` [PATCH 3/3] drivers: hwmon: i5k_amb: " Enrico Weigelt, metux IT consult
  2 siblings, 2 replies; 11+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2019-06-01 14:01 UTC (permalink / raw)
  To: linux-kernel
  Cc: rjw, viresh.kumar, jdelvare, linux, khalid, jejb,
	martin.petersen, aacraid, linux-pm, linux-hwmon, linux-scsi

The MODULE_DEVICE_TABLE() macro already checks for MODULE defined,
so the extra check here is not necessary.

Signed-off-by: Enrico Weigelt <info@metux.net>
---
 drivers/scsi/BusLogic.c | 2 --
 drivers/scsi/dpt_i2o.c  | 3 ---
 2 files changed, 5 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..9b28f9f 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[] = {
 	{ 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


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 3/3] drivers: hwmon: i5k_amb: remove unnecessary #ifdef MODULE
  2019-06-01 14:01 remove unneeded #ifdef MODULE Enrico Weigelt, metux IT consult
  2019-06-01 14:01 ` [PATCH 1/3] drivers: cpufreq: cpufreq-nforce2: remove unnecessary " Enrico Weigelt, metux IT consult
  2019-06-01 14:01 ` [PATCH 2/3] drivers: scsi: " Enrico Weigelt, metux IT consult
@ 2019-06-01 14:01 ` Enrico Weigelt, metux IT consult
  2019-06-01 22:49   ` Guenter Roeck
  2 siblings, 1 reply; 11+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2019-06-01 14:01 UTC (permalink / raw)
  To: linux-kernel
  Cc: rjw, viresh.kumar, jdelvare, linux, khalid, jejb,
	martin.petersen, aacraid, linux-pm, linux-hwmon, linux-scsi

The MODULE_DEVICE_TABLE() macro already checks for MODULE defined,
so the extra check here is not necessary.

Signed-off-by: Enrico Weigelt <info@metux.net>
---
 drivers/hwmon/i5k_amb.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/hwmon/i5k_amb.c b/drivers/hwmon/i5k_amb.c
index b09c39a..b674c2f 100644
--- a/drivers/hwmon/i5k_amb.c
+++ b/drivers/hwmon/i5k_amb.c
@@ -482,14 +482,12 @@ static int i5k_channel_probe(u16 *amb_present, unsigned long dev_id)
 	{ 0, 0 }
 };
 
-#ifdef MODULE
 static const struct pci_device_id i5k_amb_ids[] = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_5000_ERR) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_5400_ERR) },
 	{ 0, }
 };
 MODULE_DEVICE_TABLE(pci, i5k_amb_ids);
-#endif
 
 static int i5k_amb_probe(struct platform_device *pdev)
 {
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* RE: [PATCH 2/3] drivers: scsi: remove unnecessary #ifdef MODULE
  2019-06-01 14:01 ` [PATCH 2/3] drivers: scsi: " Enrico Weigelt, metux IT consult
@ 2019-06-01 15:40   ` Elliott, Robert (Servers)
  2019-06-05 23:22     ` Enrico Weigelt, metux IT consult
  2019-06-03 16:46   ` Khalid Aziz
  1 sibling, 1 reply; 11+ messages in thread
From: Elliott, Robert (Servers) @ 2019-06-01 15:40 UTC (permalink / raw)
  To: Enrico Weigelt, metux IT consult, linux-kernel
  Cc: rjw, viresh.kumar, jdelvare, linux, khalid, jejb,
	martin.petersen, aacraid, linux-pm, linux-hwmon, linux-scsi



> -----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]



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/3] drivers: hwmon: i5k_amb: remove unnecessary #ifdef MODULE
  2019-06-01 14:01 ` [PATCH 3/3] drivers: hwmon: i5k_amb: " Enrico Weigelt, metux IT consult
@ 2019-06-01 22:49   ` Guenter Roeck
  2019-06-05 23:59     ` Enrico Weigelt, metux IT consult
  0 siblings, 1 reply; 11+ messages in thread
From: Guenter Roeck @ 2019-06-01 22:49 UTC (permalink / raw)
  To: Enrico Weigelt, metux IT consult
  Cc: linux-kernel, rjw, viresh.kumar, jdelvare, khalid, jejb,
	martin.petersen, aacraid, linux-pm, linux-hwmon, linux-scsi

On Sat, Jun 01, 2019 at 04:01:40PM +0200, Enrico Weigelt, metux IT consult wrote:
> The MODULE_DEVICE_TABLE() macro already checks for MODULE defined,
> so the extra check here is not necessary.
> 
> Signed-off-by: Enrico Weigelt <info@metux.net>
> ---
>  drivers/hwmon/i5k_amb.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/hwmon/i5k_amb.c b/drivers/hwmon/i5k_amb.c
> index b09c39a..b674c2f 100644
> --- a/drivers/hwmon/i5k_amb.c
> +++ b/drivers/hwmon/i5k_amb.c
> @@ -482,14 +482,12 @@ static int i5k_channel_probe(u16 *amb_present, unsigned long dev_id)
>  	{ 0, 0 }
>  };
>  
> -#ifdef MODULE
>  static const struct pci_device_id i5k_amb_ids[] = {
>  	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_5000_ERR) },
>  	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_5400_ERR) },
>  	{ 0, }
>  };
>  MODULE_DEVICE_TABLE(pci, i5k_amb_ids);
> -#endif
>  

I'd rather know what this table is used for in the first place.

Guenter

>  static int i5k_amb_probe(struct platform_device *pdev)
>  {
> -- 
> 1.9.1
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/3] drivers: scsi: remove unnecessary #ifdef MODULE
  2019-06-01 14:01 ` [PATCH 2/3] drivers: scsi: " Enrico Weigelt, metux IT consult
  2019-06-01 15:40   ` Elliott, Robert (Servers)
@ 2019-06-03 16:46   ` Khalid Aziz
  1 sibling, 0 replies; 11+ messages in thread
From: Khalid Aziz @ 2019-06-03 16:46 UTC (permalink / raw)
  To: Enrico Weigelt, metux IT consult, linux-kernel
  Cc: rjw, viresh.kumar, jdelvare, linux, jejb, martin.petersen,
	aacraid, linux-pm, linux-hwmon, linux-scsi

On 6/1/19 8:01 AM, Enrico Weigelt, metux IT consult wrote:
> The MODULE_DEVICE_TABLE() macro already checks for MODULE defined,
> so the extra check here is not necessary.
> 
> Signed-off-by: Enrico Weigelt <info@metux.net>
> ---
>  drivers/scsi/BusLogic.c | 2 --
>  drivers/scsi/dpt_i2o.c  | 3 ---
>  2 files changed, 5 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..9b28f9f 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[] = {
>  	{ 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)
> 

As James pointed out, this will result in warning from compiler about
unused variable. Please address that first.

--
Khalid

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/3] drivers: scsi: remove unnecessary #ifdef MODULE
  2019-06-01 15:40   ` Elliott, Robert (Servers)
@ 2019-06-05 23:22     ` Enrico Weigelt, metux IT consult
  0 siblings, 0 replies; 11+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2019-06-05 23:22 UTC (permalink / raw)
  To: Elliott, Robert (Servers),
	Enrico Weigelt, metux IT consult, linux-kernel
  Cc: rjw, viresh.kumar, jdelvare, linux, khalid, jejb,
	martin.petersen, aacraid, linux-pm, linux-hwmon, linux-scsi

On 01.06.19 15:40, Elliott, Robert (Servers) wrote:

<snip>

> I don't see any reply to James' comment that these changes result in

I've missed that mail :(

> static struct definitions that are unused, which should result in
> complaints by the compiler like:
>      warning: 'dptids' defined by not used [-Wunused-variable]

hmm, seems that const is missing on dptids ... I'll test that and
repost fixed vrsion.

--mtx

-- 
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info@metux.net -- +49-151-27565287

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/3] drivers: hwmon: i5k_amb: remove unnecessary #ifdef MODULE
  2019-06-01 22:49   ` Guenter Roeck
@ 2019-06-05 23:59     ` Enrico Weigelt, metux IT consult
  2019-06-06  1:35       ` Guenter Roeck
  0 siblings, 1 reply; 11+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2019-06-05 23:59 UTC (permalink / raw)
  To: Guenter Roeck, Enrico Weigelt, metux IT consult
  Cc: linux-kernel, rjw, viresh.kumar, jdelvare, khalid, jejb,
	martin.petersen, aacraid, linux-pm, linux-hwmon, linux-scsi

On 01.06.19 22:49, Guenter Roeck wrote:
> On Sat, Jun 01, 2019 at 04:01:40PM +0200, Enrico Weigelt, metux IT consult wrote:
>> The MODULE_DEVICE_TABLE() macro already checks for MODULE defined,
>> so the extra check here is not necessary.
>>
>> Signed-off-by: Enrico Weigelt <info@metux.net>
>> ---
>>   drivers/hwmon/i5k_amb.c | 2 --
>>   1 file changed, 2 deletions(-)
>>
>> diff --git a/drivers/hwmon/i5k_amb.c b/drivers/hwmon/i5k_amb.c
>> index b09c39a..b674c2f 100644
>> --- a/drivers/hwmon/i5k_amb.c
>> +++ b/drivers/hwmon/i5k_amb.c
>> @@ -482,14 +482,12 @@ static int i5k_channel_probe(u16 *amb_present, unsigned long dev_id)
>>   	{ 0, 0 }
>>   };
>>   
>> -#ifdef MODULE
>>   static const struct pci_device_id i5k_amb_ids[] = {
>>   	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_5000_ERR) },
>>   	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_5400_ERR) },
>>   	{ 0, }
>>   };
>>   MODULE_DEVICE_TABLE(pci, i5k_amb_ids);
>> -#endif
>>   
> 
> I'd rather know what this table is used for in the first place.

Seems it's really just used for the module loader, while actual probing
is using a different table. IMHO, the worst thing my patch could do is
introducing a warning on unused variable (IMHO shouldn't happen when
it's static const).

I've just rewritten it to move everything into i5k_amb_ids ... just need
to run build tests on it (unfortunately can't run-test, as I don't have
that device).


--mtx

-- 
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info@metux.net -- +49-151-27565287

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/3] drivers: hwmon: i5k_amb: remove unnecessary #ifdef MODULE
  2019-06-05 23:59     ` Enrico Weigelt, metux IT consult
@ 2019-06-06  1:35       ` Guenter Roeck
  0 siblings, 0 replies; 11+ messages in thread
From: Guenter Roeck @ 2019-06-06  1:35 UTC (permalink / raw)
  To: Enrico Weigelt, metux IT consult, Enrico Weigelt, metux IT consult
  Cc: linux-kernel, rjw, viresh.kumar, jdelvare, khalid, jejb,
	martin.petersen, aacraid, linux-pm, linux-hwmon, linux-scsi

On 6/5/19 4:59 PM, Enrico Weigelt, metux IT consult wrote:
> On 01.06.19 22:49, Guenter Roeck wrote:
>> On Sat, Jun 01, 2019 at 04:01:40PM +0200, Enrico Weigelt, metux IT consult wrote:
>>> The MODULE_DEVICE_TABLE() macro already checks for MODULE defined,
>>> so the extra check here is not necessary.
>>>
>>> Signed-off-by: Enrico Weigelt <info@metux.net>
>>> ---
>>>   drivers/hwmon/i5k_amb.c | 2 --
>>>   1 file changed, 2 deletions(-)
>>>
>>> diff --git a/drivers/hwmon/i5k_amb.c b/drivers/hwmon/i5k_amb.c
>>> index b09c39a..b674c2f 100644
>>> --- a/drivers/hwmon/i5k_amb.c
>>> +++ b/drivers/hwmon/i5k_amb.c
>>> @@ -482,14 +482,12 @@ static int i5k_channel_probe(u16 *amb_present, unsigned long dev_id)
>>>       { 0, 0 }
>>>   };
>>> -#ifdef MODULE
>>>   static const struct pci_device_id i5k_amb_ids[] = {
>>>       { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_5000_ERR) },
>>>       { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_5400_ERR) },
>>>       { 0, }
>>>   };
>>>   MODULE_DEVICE_TABLE(pci, i5k_amb_ids);
>>> -#endif
>>
>> I'd rather know what this table is used for in the first place.
> 
> Seems it's really just used for the module loader, while actual probing
> is using a different table. IMHO, the worst thing my patch could do is
> introducing a warning on unused variable (IMHO shouldn't happen when
> it's static const).
> 

You are wrong. You'll need __maybe_unused qualifiers for those variables
to avoid the warning.

Guenter

> I've just rewritten it to move everything into i5k_amb_ids ... just need
> to run build tests on it (unfortunately can't run-test, as I don't have
> that device).
> 
> 
> --mtx
> 


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 3/3] drivers: hwmon: i5k_amb: remove unnecessary #ifdef MODULE
  2019-05-31 15:09 clean some unneeded " Enrico Weigelt, metux IT consult
@ 2019-05-31 15:09 ` Enrico Weigelt, metux IT consult
  0 siblings, 0 replies; 11+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2019-05-31 15:09 UTC (permalink / raw)
  To: linux-kernel
  Cc: rjw, viresh.kumar, jdelvare, linux, khalid, jejb,
	martin.petersen, aacraid, linux-pm, linux-hwmon, linux-scsi

The MODULE_DEVICE_TABLE() macro already checks for MODULE defined,
so the extra check here is not necessary.

Signed-off-by: Enrico Weigelt <info@metux.net>
---
 drivers/hwmon/i5k_amb.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/hwmon/i5k_amb.c b/drivers/hwmon/i5k_amb.c
index 2cf73d8..622405b 100644
--- a/drivers/hwmon/i5k_amb.c
+++ b/drivers/hwmon/i5k_amb.c
@@ -495,14 +495,12 @@ static int i5k_channel_probe(u16 *amb_present, unsigned long dev_id)
 	{ 0, 0 }
 };
 
-#ifdef MODULE
 static const struct pci_device_id i5k_amb_ids[] = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_5000_ERR) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_5400_ERR) },
 	{ 0, }
 };
 MODULE_DEVICE_TABLE(pci, i5k_amb_ids);
-#endif
 
 static int i5k_amb_probe(struct platform_device *pdev)
 {
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-06-06  1:35 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-01 14:01 remove unneeded #ifdef MODULE Enrico Weigelt, metux IT consult
2019-06-01 14:01 ` [PATCH 1/3] drivers: cpufreq: cpufreq-nforce2: remove unnecessary " Enrico Weigelt, metux IT consult
2019-06-01 14:01 ` [PATCH 2/3] drivers: scsi: " Enrico Weigelt, metux IT consult
2019-06-01 15:40   ` Elliott, Robert (Servers)
2019-06-05 23:22     ` Enrico Weigelt, metux IT consult
2019-06-03 16:46   ` Khalid Aziz
2019-06-01 14:01 ` [PATCH 3/3] drivers: hwmon: i5k_amb: " Enrico Weigelt, metux IT consult
2019-06-01 22:49   ` Guenter Roeck
2019-06-05 23:59     ` Enrico Weigelt, metux IT consult
2019-06-06  1:35       ` Guenter Roeck
  -- strict thread matches above, loose matches on Subject: below --
2019-05-31 15:09 clean some unneeded " Enrico Weigelt, metux IT consult
2019-05-31 15:09 ` [PATCH 3/3] drivers: hwmon: i5k_amb: remove unnecessary " Enrico Weigelt, metux IT consult

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).