CC: [email protected]
CC: [email protected]
TO: Ong Boon Leong <[email protected]>

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 <[email protected]>


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 at line 843 was first introduced by commit
:::::: fcb26bd2b6cab573f06e5855638368cf88e99c2b net: phy: Add Synopsys 
DesignWare XPCS MDIO module

:::::: TO: Jose Abreu <[email protected]>
:::::: CC: David S. Miller <[email protected]>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]
_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to