linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] g_NCR5380: Kill compiler warning if builtin
@ 2015-01-03 22:00 Geert Uytterhoeven
  2015-01-29  6:57 ` Finn Thain
  0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2015-01-03 22:00 UTC (permalink / raw)
  To: Finn Thain, Michael Schmitz, James E.J. Bottomley
  Cc: linux-scsi, linux-kernel, Geert Uytterhoeven

If CONFIG_SCSI_GENERIC_NCR5380=y:

drivers/scsi/g_NCR5380.c:727: warning: ‘id_table’ defined but not used

In the non-modular case, MODULE_DEVICE_TABLE() expands to nothing, and
id_table is not referenced.

Correct the existing #ifdef to fix this.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 drivers/scsi/g_NCR5380.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/g_NCR5380.c b/drivers/scsi/g_NCR5380.c
index f35792f7051c0884..74ec2f5669aba5f5 100644
--- a/drivers/scsi/g_NCR5380.c
+++ b/drivers/scsi/g_NCR5380.c
@@ -723,7 +723,7 @@ module_param(ncr_53c400a, int, 0);
 module_param(dtc_3181e, int, 0);
 MODULE_LICENSE("GPL");
 
-#ifndef SCSI_G_NCR5380_MEM
+#if !defined(SCSI_G_NCR5380_MEM) && defined(MODULE)
 static struct isapnp_device_id id_table[] = {
 	{
 	 ISAPNP_ANY_ID, ISAPNP_ANY_ID,
-- 
1.9.1


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

* Re: [PATCH] g_NCR5380: Kill compiler warning if builtin
  2015-01-03 22:00 [PATCH] g_NCR5380: Kill compiler warning if builtin Geert Uytterhoeven
@ 2015-01-29  6:57 ` Finn Thain
  0 siblings, 0 replies; 2+ messages in thread
From: Finn Thain @ 2015-01-29  6:57 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Michael Schmitz, James E.J. Bottomley, linux-scsi, linux-kernel


Acked-by: Finn Thain <fthain@telegraphics.com.au>

On Sat, 3 Jan 2015, Geert Uytterhoeven wrote:

> If CONFIG_SCSI_GENERIC_NCR5380=y:
> 
> drivers/scsi/g_NCR5380.c:727: warning: ?id_table? defined but not used
> 
> In the non-modular case, MODULE_DEVICE_TABLE() expands to nothing, and
> id_table is not referenced.
> 
> Correct the existing #ifdef to fix this.
> 
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> ---
>  drivers/scsi/g_NCR5380.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/g_NCR5380.c b/drivers/scsi/g_NCR5380.c
> index f35792f7051c0884..74ec2f5669aba5f5 100644
> --- a/drivers/scsi/g_NCR5380.c
> +++ b/drivers/scsi/g_NCR5380.c
> @@ -723,7 +723,7 @@ module_param(ncr_53c400a, int, 0);
>  module_param(dtc_3181e, int, 0);
>  MODULE_LICENSE("GPL");
>  
> -#ifndef SCSI_G_NCR5380_MEM
> +#if !defined(SCSI_G_NCR5380_MEM) && defined(MODULE)
>  static struct isapnp_device_id id_table[] = {
>  	{
>  	 ISAPNP_ANY_ID, ISAPNP_ANY_ID,
> 

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

end of thread, other threads:[~2015-01-29  6:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-03 22:00 [PATCH] g_NCR5380: Kill compiler warning if builtin Geert Uytterhoeven
2015-01-29  6:57 ` Finn Thain

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