From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: drivers/net/pcs/pcs-xpcs.c:843:13: warning: Identical inner 'return' condition is always true. [identicalInnerCondition]
Date: Wed, 15 Dec 2021 22:34:28 +0800 [thread overview]
Message-ID: <202112152203.qpNcvvqD-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 5643 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Ong Boon Leong <boon.leong.ong@intel.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 5472f14a37421d1bca3dddf33cabd3bd6dbefbbc
commit: b97b5331b8ab7f60fb880e0c31c9b09b73d2fa4e net: pcs: add C37 SGMII AN support for intel mGbE controller
date: 9 months ago
:::::: branch date: 2 days ago
:::::: commit date: 9 months ago
compiler: s390-linux-gcc (GCC) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
>> drivers/net/pcs/pcs-xpcs.c:843:13: warning: Identical inner 'return' condition is always true. [identicalInnerCondition]
return id | ret;
^
drivers/net/pcs/pcs-xpcs.c:842:9: note: outer condition: id|ret
if (id | ret)
^
drivers/net/pcs/pcs-xpcs.c:843:13: note: identical inner condition: id|ret
return id | ret;
^
drivers/net/pcs/pcs-xpcs.c:858:13: warning: Identical inner 'return' condition is always true. [identicalInnerCondition]
return id | ret;
^
drivers/net/pcs/pcs-xpcs.c:857:9: note: outer condition: id|ret
if (id | ret)
^
drivers/net/pcs/pcs-xpcs.c:858:13: note: identical inner condition: id|ret
return id | ret;
^
vim +/return +843 drivers/net/pcs/pcs-xpcs.c
fcb26bd2b6cab5 drivers/net/phy/mdio-xpcs.c Jose Abreu 2020-03-09 824
fcb26bd2b6cab5 drivers/net/phy/mdio-xpcs.c Jose Abreu 2020-03-09 825 static u32 xpcs_get_id(struct mdio_xpcs_args *xpcs)
fcb26bd2b6cab5 drivers/net/phy/mdio-xpcs.c Jose Abreu 2020-03-09 826 {
fcb26bd2b6cab5 drivers/net/phy/mdio-xpcs.c Jose Abreu 2020-03-09 827 int ret;
fcb26bd2b6cab5 drivers/net/phy/mdio-xpcs.c Jose Abreu 2020-03-09 828 u32 id;
fcb26bd2b6cab5 drivers/net/phy/mdio-xpcs.c Jose Abreu 2020-03-09 829
b97b5331b8ab7f drivers/net/pcs/pcs-xpcs.c Ong Boon Leong 2021-03-15 830 /* First, search C73 PCS using PCS MMD */
fcb26bd2b6cab5 drivers/net/phy/mdio-xpcs.c Jose Abreu 2020-03-09 831 ret = xpcs_read(xpcs, MDIO_MMD_PCS, MII_PHYSID1);
fcb26bd2b6cab5 drivers/net/phy/mdio-xpcs.c Jose Abreu 2020-03-09 832 if (ret < 0)
fcb26bd2b6cab5 drivers/net/phy/mdio-xpcs.c Jose Abreu 2020-03-09 833 return 0xffffffff;
fcb26bd2b6cab5 drivers/net/phy/mdio-xpcs.c Jose Abreu 2020-03-09 834
fcb26bd2b6cab5 drivers/net/phy/mdio-xpcs.c Jose Abreu 2020-03-09 835 id = ret << 16;
fcb26bd2b6cab5 drivers/net/phy/mdio-xpcs.c Jose Abreu 2020-03-09 836
fcb26bd2b6cab5 drivers/net/phy/mdio-xpcs.c Jose Abreu 2020-03-09 837 ret = xpcs_read(xpcs, MDIO_MMD_PCS, MII_PHYSID2);
fcb26bd2b6cab5 drivers/net/phy/mdio-xpcs.c Jose Abreu 2020-03-09 838 if (ret < 0)
fcb26bd2b6cab5 drivers/net/phy/mdio-xpcs.c Jose Abreu 2020-03-09 839 return 0xffffffff;
fcb26bd2b6cab5 drivers/net/phy/mdio-xpcs.c Jose Abreu 2020-03-09 840
b97b5331b8ab7f drivers/net/pcs/pcs-xpcs.c Ong Boon Leong 2021-03-15 841 /* If Device IDs are not all zeros, we found C73 AN-type device */
b97b5331b8ab7f drivers/net/pcs/pcs-xpcs.c Ong Boon Leong 2021-03-15 842 if (id | ret)
fcb26bd2b6cab5 drivers/net/phy/mdio-xpcs.c Jose Abreu 2020-03-09 @843 return id | ret;
b97b5331b8ab7f drivers/net/pcs/pcs-xpcs.c Ong Boon Leong 2021-03-15 844
b97b5331b8ab7f drivers/net/pcs/pcs-xpcs.c Ong Boon Leong 2021-03-15 845 /* Next, search C37 PCS using Vendor-Specific MII MMD */
b97b5331b8ab7f drivers/net/pcs/pcs-xpcs.c Ong Boon Leong 2021-03-15 846 ret = xpcs_read(xpcs, MDIO_MMD_VEND2, MII_PHYSID1);
b97b5331b8ab7f drivers/net/pcs/pcs-xpcs.c Ong Boon Leong 2021-03-15 847 if (ret < 0)
b97b5331b8ab7f drivers/net/pcs/pcs-xpcs.c Ong Boon Leong 2021-03-15 848 return 0xffffffff;
b97b5331b8ab7f drivers/net/pcs/pcs-xpcs.c Ong Boon Leong 2021-03-15 849
b97b5331b8ab7f drivers/net/pcs/pcs-xpcs.c Ong Boon Leong 2021-03-15 850 id = ret << 16;
b97b5331b8ab7f drivers/net/pcs/pcs-xpcs.c Ong Boon Leong 2021-03-15 851
b97b5331b8ab7f drivers/net/pcs/pcs-xpcs.c Ong Boon Leong 2021-03-15 852 ret = xpcs_read(xpcs, MDIO_MMD_VEND2, MII_PHYSID2);
b97b5331b8ab7f drivers/net/pcs/pcs-xpcs.c Ong Boon Leong 2021-03-15 853 if (ret < 0)
b97b5331b8ab7f drivers/net/pcs/pcs-xpcs.c Ong Boon Leong 2021-03-15 854 return 0xffffffff;
b97b5331b8ab7f drivers/net/pcs/pcs-xpcs.c Ong Boon Leong 2021-03-15 855
b97b5331b8ab7f drivers/net/pcs/pcs-xpcs.c Ong Boon Leong 2021-03-15 856 /* If Device IDs are not all zeros, we found C37 AN-type device */
b97b5331b8ab7f drivers/net/pcs/pcs-xpcs.c Ong Boon Leong 2021-03-15 857 if (id | ret)
b97b5331b8ab7f drivers/net/pcs/pcs-xpcs.c Ong Boon Leong 2021-03-15 858 return id | ret;
b97b5331b8ab7f drivers/net/pcs/pcs-xpcs.c Ong Boon Leong 2021-03-15 859
b97b5331b8ab7f drivers/net/pcs/pcs-xpcs.c Ong Boon Leong 2021-03-15 860 return 0xffffffff;
fcb26bd2b6cab5 drivers/net/phy/mdio-xpcs.c Jose Abreu 2020-03-09 861 }
fcb26bd2b6cab5 drivers/net/phy/mdio-xpcs.c Jose Abreu 2020-03-09 862
:::::: The code@line 843 was first introduced by commit
:::::: fcb26bd2b6cab573f06e5855638368cf88e99c2b net: phy: Add Synopsys DesignWare XPCS MDIO module
:::::: TO: Jose Abreu <Jose.Abreu@synopsys.com>
:::::: CC: David S. Miller <davem@davemloft.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
next reply other threads:[~2021-12-15 14:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-15 14:34 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-02-04 1:28 drivers/net/pcs/pcs-xpcs.c:843:13: warning: Identical inner 'return' condition is always true. [identicalInnerCondition] kernel test robot
2022-02-03 0:18 kernel test robot
2021-11-11 12:20 kernel test robot
2021-08-12 8:59 kernel test robot
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=202112152203.qpNcvvqD-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild@lists.01.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.