From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: Nathan Chancellor <natechancellor@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
driverdevel <devel@driverdev.osuosl.org>,
Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>,
kbuild test robot <lkp@intel.com>,
kernel-build-reports@lists.linaro.org,
Greg KH <gregkh@linuxfoundation.org>,
Matthew Wilcox <willy@infradead.org>,
Mark Brown <broonie@kernel.org>,
Linux-Next <linux-next@vger.kernel.org>,
netdev <netdev@vger.kernel.org>,
Linux ARM <linux-arm-kernel@lists.infradead.org>,
Heiner Kallweit <hkallweit1@gmail.com>
Subject: Re: [PATCH] net: mdio-octeon: Fix build error and Kconfig warning
Date: Thu, 19 Sep 2019 11:06:00 +0200 [thread overview]
Message-ID: <CAMuHMdXya55UJttU1xvX5+-N658Xqfa0k8sSKTGbtdBHgPEFcg@mail.gmail.com> (raw)
In-Reply-To: <64f7ef68-c373-5ff5-ff6d-8a7ce0e30798@infradead.org>
On Thu, Aug 1, 2019 at 1:52 AM Randy Dunlap <rdunlap@infradead.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@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
next prev parent reply other threads:[~2019-09-19 9:06 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <5d41767d.1c69fb81.d6304.4c8c@mx.google.com>
2019-07-31 11:24 ` next/master build: 221 builds: 11 failed, 210 passed, 13 errors, 1174 warnings (next-20190731) Mark Brown
2019-07-31 11:35 ` Greg Kroah-Hartman
2019-07-31 15:48 ` David Miller
2019-07-31 16:00 ` Greg KH
2019-07-31 16:35 ` Nathan Chancellor
2019-07-31 16:41 ` David Miller
2019-07-31 18:50 ` [PATCH] net: mdio-octeon: Fix build error and Kconfig warning Nathan Chancellor
2019-07-31 21:55 ` Randy Dunlap
2019-07-31 23:52 ` Randy Dunlap
2019-09-19 9:06 ` Geert Uytterhoeven [this message]
2019-08-03 1:11 ` David Miller
2019-08-03 1:30 ` Nathan Chancellor
2019-08-03 1:39 ` Matthew Wilcox
2019-08-03 6:05 ` Nathan Chancellor
2019-08-03 6:01 ` [PATCH v2] net: mdio-octeon: Fix Kconfig warnings and build errors Nathan Chancellor
2019-08-03 18:34 ` Randy Dunlap
2019-08-06 21:11 ` David Miller
2019-08-07 5:10 ` Nathan Chancellor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAMuHMdXya55UJttU1xvX5+-N658Xqfa0k8sSKTGbtdBHgPEFcg@mail.gmail.com \
--to=geert@linux-m68k.org \
--cc=andrew@lunn.ch \
--cc=broonie@kernel.org \
--cc=davem@davemloft.net \
--cc=devel@driverdev.osuosl.org \
--cc=f.fainelli@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=hkallweit1@gmail.com \
--cc=kernel-build-reports@lists.linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-next@vger.kernel.org \
--cc=lkp@intel.com \
--cc=natechancellor@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=rdunlap@infradead.org \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).