Skip to contentSkip to conversation

smsc: Undefine SMC_inb and SMC_outb before define

PATCH Will Deacon 1 participant 1 message Aug 7, 2014 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 17 lines · Nick Krause

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

---
 drivers/net/ethernet/smsc/smc91x.h | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/ethernet/smsc/smc91x.h +0 -0
index 47dce91..d1c5441 100644

drivers/net/ethernet/smsc/smc91x.h smc_pxa_dma_irq(int dma, void *dummy) · line 494

Quoted 8 lines
drivers/net/ethernet/smsc/smc91x.h +2 -0
@@ -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