public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: smsc: remove build warning of duplicate definition
@ 2016-08-31 17:27 Sudip Mukherjee
  2016-08-31 17:40 ` Nicolas Pitre
  0 siblings, 1 reply; 2+ messages in thread
From: Sudip Mukherjee @ 2016-08-31 17:27 UTC (permalink / raw)
  To: Nicolas Pitre, David S. Miller; +Cc: linux-kernel, netdev, Sudip Mukherjee

The build of m32r was giving warning:

In file included from drivers/net/ethernet/smsc/smc91x.c:92:0:
drivers/net/ethernet/smsc/smc91x.h:448:0: warning: "SMC_inb" redefined
 #define SMC_inb(ioaddr, reg)  ({ BUG(); 0; })
 
drivers/net/ethernet/smsc/smc91x.h:106:0:
	note: this is the location of the previous definition
 #define SMC_inb(a, r)  inb(((u32)a) + (r))
 
drivers/net/ethernet/smsc/smc91x.h:449:0: warning: "SMC_outb" redefined
 #define SMC_outb(x, ioaddr, reg) BUG()
 
drivers/net/ethernet/smsc/smc91x.h:108:0:
	note: this is the location of the previous definition
 #define SMC_outb(v, a, r) outb(v, ((u32)a) + (r))

Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
---

m32r allmodconfig build of next-20160825 is at:
https://travis-ci.org/sudipm-mukherjee/parport/jobs/154943795

 drivers/net/ethernet/smsc/smc91x.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/ethernet/smsc/smc91x.h b/drivers/net/ethernet/smsc/smc91x.h
index 1a55c79..0b0bb74 100644
--- a/drivers/net/ethernet/smsc/smc91x.h
+++ b/drivers/net/ethernet/smsc/smc91x.h
@@ -445,7 +445,14 @@ smc_pxa_dma_insw(void __iomem *ioaddr, struct smc_local *lp, int reg, int dma,
 #endif
 
 #if ! SMC_CAN_USE_8BIT
+#ifdef SMC_inb
+#undef SMC_inb
+#endif
 #define SMC_inb(ioaddr, reg)		({ BUG(); 0; })
+
+#ifdef SMC_outb
+#undef SMC_outb
+#endif
 #define SMC_outb(x, ioaddr, reg)	BUG()
 #define SMC_insb(a, r, p, l)		BUG()
 #define SMC_outsb(a, r, p, l)		BUG()
-- 
1.9.1

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

* Re: [PATCH] net: smsc: remove build warning of duplicate definition
  2016-08-31 17:27 [PATCH] net: smsc: remove build warning of duplicate definition Sudip Mukherjee
@ 2016-08-31 17:40 ` Nicolas Pitre
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Pitre @ 2016-08-31 17:40 UTC (permalink / raw)
  To: Sudip Mukherjee; +Cc: David S. Miller, linux-kernel, netdev

On Wed, 31 Aug 2016, Sudip Mukherjee wrote:

> The build of m32r was giving warning:
> 
> In file included from drivers/net/ethernet/smsc/smc91x.c:92:0:
> drivers/net/ethernet/smsc/smc91x.h:448:0: warning: "SMC_inb" redefined
>  #define SMC_inb(ioaddr, reg)  ({ BUG(); 0; })
>  
> drivers/net/ethernet/smsc/smc91x.h:106:0:
> 	note: this is the location of the previous definition
>  #define SMC_inb(a, r)  inb(((u32)a) + (r))
>  
> drivers/net/ethernet/smsc/smc91x.h:449:0: warning: "SMC_outb" redefined
>  #define SMC_outb(x, ioaddr, reg) BUG()
>  
> drivers/net/ethernet/smsc/smc91x.h:108:0:
> 	note: this is the location of the previous definition
>  #define SMC_outb(v, a, r) outb(v, ((u32)a) + (r))
> 
> Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
> ---
> 
> m32r allmodconfig build of next-20160825 is at:
> https://travis-ci.org/sudipm-mukherjee/parport/jobs/154943795
> 
>  drivers/net/ethernet/smsc/smc91x.h | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/net/ethernet/smsc/smc91x.h b/drivers/net/ethernet/smsc/smc91x.h
> index 1a55c79..0b0bb74 100644
> --- a/drivers/net/ethernet/smsc/smc91x.h
> +++ b/drivers/net/ethernet/smsc/smc91x.h
> @@ -445,7 +445,14 @@ smc_pxa_dma_insw(void __iomem *ioaddr, struct smc_local *lp, int reg, int dma,
>  #endif
>  
>  #if ! SMC_CAN_USE_8BIT
> +#ifdef SMC_inb
> +#undef SMC_inb
> +#endif
>  #define SMC_inb(ioaddr, reg)		({ BUG(); 0; })
> +
> +#ifdef SMC_outb
> +#undef SMC_outb
> +#endif

Please just do the undef without any conditional.



>  #define SMC_outb(x, ioaddr, reg)	BUG()
>  #define SMC_insb(a, r, p, l)		BUG()
>  #define SMC_outsb(a, r, p, l)		BUG()
> -- 
> 1.9.1
> 
> 

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

end of thread, other threads:[~2016-08-31 17:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-31 17:27 [PATCH] net: smsc: remove build warning of duplicate definition Sudip Mukherjee
2016-08-31 17:40 ` Nicolas Pitre

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox