net: smc91x: Remove accidentally introduced casts
Subsystems (2)
PATCH 1/1 net: smc91x: Remove accidentally introduced casts
arm/lpd270_defconfig:
drivers/net/ethernet/smsc/smc91x.c: In function 'smc_rcv':
drivers/net/ethernet/smsc/smc91x.c:490:3: warning: passing argument 5 of 'smc_pxa_dma_insw' from incompatible pointer type [enabled by default] drivers/net/ethernet/smsc/smc91x.h:423:1: note: expected 'u_char *' but argument is of type 'u16 *'
Introduced by commit afb3df11f1c8925811a1087f2351b0738a3146a2 ("m68k: Atari EtherNAT warning fixes").
Remove two casts to fix this:
- The first cast was in the !CONFIG_ATARI case, so it didn't matter for us anyway,
- The second cast is for a pointer parameter we don't do arithmetic operations on, so it's also not needed.
--- drivers/net/ethernet/smsc/smc91x.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/smsc/smc91x.h +2 -2
@@ -1179,7 +1179,7 @@ static const char * chip_ids[ 16 ] = {SMC_outsw (ioaddr,DATA_REG (lp), __ptr,1 ); \ } \ }else if (SMC_16BIT (lp)) \ -SMC_outsw (ioaddr,DATA_REG (lp), (u16 *) p, (l) >>1 ); \ +SMC_outsw (ioaddr,DATA_REG (lp), p, (l) >>1 ); \else if (SMC_8BIT (lp)) \SMC_outsb (ioaddr,DATA_REG (lp), p, l); \ }while (0 )
@@ -1215,7 +1215,7 @@ static const char * chip_ids[ 16 ] = { __len +=2 ; \SMC_insl (__ioaddr,DATA_REG (lp), __ptr, __len>>2 ); \ }else if (SMC_16BIT (lp)) \ -SMC_insw (ioaddr,DATA_REG (lp), (u16 *) p, (l) >>1 ); \ +SMC_insw (ioaddr,DATA_REG (lp), p, (l) >>1 ); \else if (SMC_8BIT (lp)) \SMC_insb (ioaddr,DATA_REG (lp), p, l); \ }while (0 )
Signature · 1 line
1.7.9.5
Geert Uytterhoeven
AppliedQuoted 9 lines · Geert Uytterhoeven
arm/lpd270_defconfig:
drivers/net/ethernet/smsc/smc91x.c: In function 'smc_rcv':
drivers/net/ethernet/smsc/smc91x.c:490:3: warning: passing argument 5 of 'smc_pxa_dma_insw' from incompatible pointer type [enabled by default]drivers/net/ethernet/smsc/smc91x.h:423:1: note: expected 'u_char*' but argument is of type 'u16 *'Introduced by commit
afb3df11f1c8925811a1087f2351b0738a3146a2("m68k: Atari EtherNAT warning fixes").
Quoted 8 lines
Remove two casts to fix this:
- The first cast was in the !CONFIG_ATARI case, so it didn't matter for us anyway,
- The second cast is for a pointer parameter we don't do arithmetic operations on, so it's also not needed.Reported-by kbuild test robot <[email protected]>Signed-off-by Geert Uytterhoeven <[email protected]>
Applied to master, folded into "m68k/atari: EtherNAT - ethernet support (smc91x)" on m68k-queue.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds