[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMuHMdXya55UJttU1xvX5+-N658Xqfa0k8sSKTGbtdBHgPEFcg@mail.gmail.com>
Date: Thu, 19 Sep 2019 11:06:00 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Randy Dunlap <rdunlap@...radead.org>
Cc: Nathan Chancellor <natechancellor@...il.com>,
"David S. Miller" <davem@...emloft.net>,
driverdevel <devel@...verdev.osuosl.org>,
Andrew Lunn <andrew@...n.ch>,
Florian Fainelli <f.fainelli@...il.com>,
kbuild test robot <lkp@...el.com>,
kernel-build-reports@...ts.linaro.org,
Greg KH <gregkh@...uxfoundation.org>,
Matthew Wilcox <willy@...radead.org>,
Mark Brown <broonie@...nel.org>,
Linux-Next <linux-next@...r.kernel.org>,
netdev <netdev@...r.kernel.org>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
Heiner Kallweit <hkallweit1@...il.com>
Subject: Re: [PATCH] net: mdio-octeon: Fix build error and Kconfig warning
On Thu, Aug 1, 2019 at 1:52 AM Randy Dunlap <rdunlap@...radead.org> wrote:
> However, there are lots of type/cast warnings in both mdio-octeon and mdio-cavium:
>
> ../drivers/net/phy/mdio-octeon.c: In function ‘octeon_mdiobus_probe’:
> ../drivers/net/phy/mdio-octeon.c:48:3: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
> (u64)devm_ioremap(&pdev->dev, mdio_phys, regsize);
> ^
cavium_mdiobus.register_base should be "void __iomem *" instead of "u64",
and the cast should be dropped.
> In file included from ../drivers/net/phy/mdio-octeon.c:14:0:
> ../drivers/net/phy/mdio-cavium.h:113:48: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
> #define oct_mdio_writeq(val, addr) writeq(val, (void *)addr)
> ^
... which allows to drop this cast as well.
Casts are evil, and usually a sign that you're doing something wrong.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-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
Powered by blists - more mailing lists