From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: [bug report] dpaa2-eth: add MAC/PHY support through phylink
Date: Wed, 06 Nov 2019 08:23:29 +0000 [thread overview]
Message-ID: <20191106082329.GA32733@mwanda> (raw)
Hello Ioana Ciornei,
The patch 719479230893: "dpaa2-eth: add MAC/PHY support through
phylink" from Oct 31, 2019, leads to the following static checker
warning:
drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c:55 dpaa2_mac_get_if_mode()
warn: always true condition '(if_mode >= 0) => (0-u32max >= 0)'
drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c
44 static int dpaa2_mac_get_if_mode(struct device_node *node,
45 struct dpmac_attr attr)
46 {
47 phy_interface_t if_mode;
48 int err;
49
50 err = of_get_phy_mode(node, &if_mode);
51 if (!err)
52 return if_mode;
53
54 if_mode = phy_mode(attr.eth_if);
55 if (if_mode >= 0)
^^^^^^^^^^^^
This enum is unsigned so the condition is always true.
56 return if_mode;
57
58 return -ENODEV;
59 }
regards,
dan carpenter
next reply other threads:[~2019-11-06 8:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-06 8:23 Dan Carpenter [this message]
2019-11-06 16:37 ` [bug report] dpaa2-eth: add MAC/PHY support through phylink Ioana Ciornei
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=20191106082329.GA32733@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.