From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: re: stmmac: add ipq806x glue layer
Date: Thu, 30 Jul 2015 19:12:55 +0000 [thread overview]
Message-ID: <20150730191219.GA13023@mwanda> (raw)
Hello Mathieu Olivari,
The patch b1c17215d718: "stmmac: add ipq806x glue layer" from May 27,
2015, leads to the following static checker warning:
drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c:314 ipq806x_gmac_probe()
warn: double left shift '1 << (1 << gmac->id)'
drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c
312 switch (gmac->phy_mode) {
313 case PHY_INTERFACE_MODE_RGMII:
314 val |= NSS_COMMON_CLK_SRC_CTRL_RGMII(gmac->id) <<
315 NSS_COMMON_CLK_SRC_CTRL_OFFSET(gmac->id);
It's very strange to shift to do this. My guess is we should delete the
NSS_COMMON_CLK_SRC_CTRL_RGMII macro and just use:
val |= NSS_COMMON_CLK_SRC_CTRL_OFFSET(gmac->id);
316 break;
317 case PHY_INTERFACE_MODE_SGMII:
318 val |= NSS_COMMON_CLK_SRC_CTRL_SGMII(gmac->id) <<
319 NSS_COMMON_CLK_SRC_CTRL_OFFSET(gmac->id);
Same here.
320 break;
321 default:
322 dev_err(&pdev->dev, "Unsupported PHY mode: \"%s\"\n",
323 phy_modes(gmac->phy_mode));
324 return -EINVAL;
325 }
regards,
dan carpenter
next reply other threads:[~2015-07-30 19:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-30 19:12 Dan Carpenter [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-08-04 22:49 stmmac: add ipq806x glue layer Dan Carpenter
2015-06-02 10:03 Dan Carpenter
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=20150730191219.GA13023@mwanda \
--to=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.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).