public inbox for linux-m68k@lists.linux-m68k.org
 help / color / mirror / Atom feed
* [PATCH] net: smc91x: Remove accidentally introduced casts
@ 2014-01-19 10:10 Geert Uytterhoeven
  2014-01-19 10:13 ` Geert Uytterhoeven
  0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2014-01-19 10:10 UTC (permalink / raw)
  To: Michael Schmitz, linux-m68k; +Cc: 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").

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 <fengguang.wu@intel.com>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 drivers/net/ethernet/smsc/smc91x.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/smsc/smc91x.h b/drivers/net/ethernet/smsc/smc91x.h
index 68ad0769ad9c..27a5fdf5b250 100644
--- a/drivers/net/ethernet/smsc/smc91x.h
+++ b/drivers/net/ethernet/smsc/smc91x.h
@@ -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)
-- 
1.7.9.5

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

* Re: [PATCH] net: smc91x: Remove accidentally introduced casts
  2014-01-19 10:10 [PATCH] net: smc91x: Remove accidentally introduced casts Geert Uytterhoeven
@ 2014-01-19 10:13 ` Geert Uytterhoeven
  0 siblings, 0 replies; 2+ messages in thread
From: Geert Uytterhoeven @ 2014-01-19 10:13 UTC (permalink / raw)
  To: Michael Schmitz, Linux/m68k; +Cc: Geert Uytterhoeven

On Sun, Jan 19, 2014 at 11:10 AM, Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
> 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.
>
> Reported-by: kbuild test robot <fengguang.wu@intel.com>
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

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 -- geert@linux-m68k.org

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

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

end of thread, other threads:[~2014-01-19 10:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-19 10:10 [PATCH] net: smc91x: Remove accidentally introduced casts Geert Uytterhoeven
2014-01-19 10:13 ` Geert Uytterhoeven

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