Subject: Re: [PATCH] smsc: Undefine SMC_inb and SMC_outb before define

From: Will Deacon <[email-masked]>
Date: Thu, 7 Aug 2014 13:55:57 +0100

On Thu, Aug 07, 2014 at 07:29:00AM +0100, Nick Krause wrote:
> Undefine SMC_inb and SMC_outb before redifing to prevent warning which follows
> 
> drivers/net/ethernet/smsc/smc91x.h:490:0: warning: "SMC_inb" redefined [enabled by default]
> drivers/net/ethernet/smsc/smc91x.h:199:0: note: this is the location of the previous definition
> drivers/net/ethernet/smsc/smc91x.h:491:0: warning: "SMC_outb" redefined [enabled by default]
> drivers/net/ethernet/smsc/smc91x.h:201:0: note: this is the location of the previous definition
> 
> Signed-off-by: Nick Krause <[email-masked]>
> ---
>  drivers/net/ethernet/smsc/smc91x.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/ethernet/smsc/smc91x.h b/drivers/net/ethernet/smsc/smc91x.h
> index 47dce91..d1c5441 100644
> --- a/drivers/net/ethernet/smsc/smc91x.h
> +++ b/drivers/net/ethernet/smsc/smc91x.h
> @@ -487,6 +487,8 @@ smc_pxa_dma_irq(int dma, void *dummy)
>  #endif
>  
>  #if ! SMC_CAN_USE_8BIT
> +#undef  SMC_inb
> +#undef  SMC_outb
>  #define SMC_inb(ioaddr, reg)		({ BUG(); 0; })
>  #define SMC_outb(x, ioaddr, reg)	BUG()
>  #define SMC_insb(a, r, p, l)		BUG()

Nak. The real issue here appears to be that the CONFIG_M32R code defines
SMC_CAN_USE_8BIT as 0 but then defines SMC_inb/SMC_outb anyway.

Will