All of lore.kernel.org
 help / color / mirror / Atom feed
* drivers/net/pcs/pcs-xpcs.c:843:13: warning: Identical inner 'return' condition is always true. [identicalInnerCondition]
@ 2022-02-03  0:18 kernel test robot
  0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2022-02-03  0:18 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 5689 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:   9f7fb8de5d9bac17b6392a14af40baf555d9129b
commit: b97b5331b8ab7f60fb880e0c31c9b09b73d2fa4e net: pcs: add C37 SGMII AN support for intel mGbE controller
date:   11 months ago
:::::: branch date: 26 hours ago
:::::: commit date: 11 months ago
compiler: sparc64-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

fcb26bd2b6cab57 drivers/net/phy/mdio-xpcs.c Jose Abreu     2020-03-09  824  
fcb26bd2b6cab57 drivers/net/phy/mdio-xpcs.c Jose Abreu     2020-03-09  825  static u32 xpcs_get_id(struct mdio_xpcs_args *xpcs)
fcb26bd2b6cab57 drivers/net/phy/mdio-xpcs.c Jose Abreu     2020-03-09  826  {
fcb26bd2b6cab57 drivers/net/phy/mdio-xpcs.c Jose Abreu     2020-03-09  827  	int ret;
fcb26bd2b6cab57 drivers/net/phy/mdio-xpcs.c Jose Abreu     2020-03-09  828  	u32 id;
fcb26bd2b6cab57 drivers/net/phy/mdio-xpcs.c Jose Abreu     2020-03-09  829  
b97b5331b8ab7f6 drivers/net/pcs/pcs-xpcs.c  Ong Boon Leong 2021-03-15  830  	/* First, search C73 PCS using PCS MMD */
fcb26bd2b6cab57 drivers/net/phy/mdio-xpcs.c Jose Abreu     2020-03-09  831  	ret = xpcs_read(xpcs, MDIO_MMD_PCS, MII_PHYSID1);
fcb26bd2b6cab57 drivers/net/phy/mdio-xpcs.c Jose Abreu     2020-03-09  832  	if (ret < 0)
fcb26bd2b6cab57 drivers/net/phy/mdio-xpcs.c Jose Abreu     2020-03-09  833  		return 0xffffffff;
fcb26bd2b6cab57 drivers/net/phy/mdio-xpcs.c Jose Abreu     2020-03-09  834  
fcb26bd2b6cab57 drivers/net/phy/mdio-xpcs.c Jose Abreu     2020-03-09  835  	id = ret << 16;
fcb26bd2b6cab57 drivers/net/phy/mdio-xpcs.c Jose Abreu     2020-03-09  836  
fcb26bd2b6cab57 drivers/net/phy/mdio-xpcs.c Jose Abreu     2020-03-09  837  	ret = xpcs_read(xpcs, MDIO_MMD_PCS, MII_PHYSID2);
fcb26bd2b6cab57 drivers/net/phy/mdio-xpcs.c Jose Abreu     2020-03-09  838  	if (ret < 0)
fcb26bd2b6cab57 drivers/net/phy/mdio-xpcs.c Jose Abreu     2020-03-09  839  		return 0xffffffff;
fcb26bd2b6cab57 drivers/net/phy/mdio-xpcs.c Jose Abreu     2020-03-09  840  
b97b5331b8ab7f6 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 */
b97b5331b8ab7f6 drivers/net/pcs/pcs-xpcs.c  Ong Boon Leong 2021-03-15  842  	if (id | ret)
fcb26bd2b6cab57 drivers/net/phy/mdio-xpcs.c Jose Abreu     2020-03-09 @843  		return id | ret;
b97b5331b8ab7f6 drivers/net/pcs/pcs-xpcs.c  Ong Boon Leong 2021-03-15  844  
b97b5331b8ab7f6 drivers/net/pcs/pcs-xpcs.c  Ong Boon Leong 2021-03-15  845  	/* Next, search C37 PCS using Vendor-Specific MII MMD */
b97b5331b8ab7f6 drivers/net/pcs/pcs-xpcs.c  Ong Boon Leong 2021-03-15  846  	ret = xpcs_read(xpcs, MDIO_MMD_VEND2, MII_PHYSID1);
b97b5331b8ab7f6 drivers/net/pcs/pcs-xpcs.c  Ong Boon Leong 2021-03-15  847  	if (ret < 0)
b97b5331b8ab7f6 drivers/net/pcs/pcs-xpcs.c  Ong Boon Leong 2021-03-15  848  		return 0xffffffff;
b97b5331b8ab7f6 drivers/net/pcs/pcs-xpcs.c  Ong Boon Leong 2021-03-15  849  
b97b5331b8ab7f6 drivers/net/pcs/pcs-xpcs.c  Ong Boon Leong 2021-03-15  850  	id = ret << 16;
b97b5331b8ab7f6 drivers/net/pcs/pcs-xpcs.c  Ong Boon Leong 2021-03-15  851  
b97b5331b8ab7f6 drivers/net/pcs/pcs-xpcs.c  Ong Boon Leong 2021-03-15  852  	ret = xpcs_read(xpcs, MDIO_MMD_VEND2, MII_PHYSID2);
b97b5331b8ab7f6 drivers/net/pcs/pcs-xpcs.c  Ong Boon Leong 2021-03-15  853  	if (ret < 0)
b97b5331b8ab7f6 drivers/net/pcs/pcs-xpcs.c  Ong Boon Leong 2021-03-15  854  		return 0xffffffff;
b97b5331b8ab7f6 drivers/net/pcs/pcs-xpcs.c  Ong Boon Leong 2021-03-15  855  
b97b5331b8ab7f6 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 */
b97b5331b8ab7f6 drivers/net/pcs/pcs-xpcs.c  Ong Boon Leong 2021-03-15  857  	if (id | ret)
b97b5331b8ab7f6 drivers/net/pcs/pcs-xpcs.c  Ong Boon Leong 2021-03-15  858  		return id | ret;
b97b5331b8ab7f6 drivers/net/pcs/pcs-xpcs.c  Ong Boon Leong 2021-03-15  859  
b97b5331b8ab7f6 drivers/net/pcs/pcs-xpcs.c  Ong Boon Leong 2021-03-15  860  	return 0xffffffff;
fcb26bd2b6cab57 drivers/net/phy/mdio-xpcs.c Jose Abreu     2020-03-09  861  }
fcb26bd2b6cab57 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* drivers/net/pcs/pcs-xpcs.c:843:13: warning: Identical inner 'return' condition is always true. [identicalInnerCondition]
@ 2022-02-04  1:28 kernel test robot
  0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2022-02-04  1:28 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 5687 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:   88808fbbead481aedb46640a5ace69c58287f56a
commit: b97b5331b8ab7f60fb880e0c31c9b09b73d2fa4e net: pcs: add C37 SGMII AN support for intel mGbE controller
date:   11 months ago
:::::: branch date: 22 hours ago
:::::: commit date: 11 months ago
compiler: nios2-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

fcb26bd2b6cab57 drivers/net/phy/mdio-xpcs.c Jose Abreu     2020-03-09  824  
fcb26bd2b6cab57 drivers/net/phy/mdio-xpcs.c Jose Abreu     2020-03-09  825  static u32 xpcs_get_id(struct mdio_xpcs_args *xpcs)
fcb26bd2b6cab57 drivers/net/phy/mdio-xpcs.c Jose Abreu     2020-03-09  826  {
fcb26bd2b6cab57 drivers/net/phy/mdio-xpcs.c Jose Abreu     2020-03-09  827  	int ret;
fcb26bd2b6cab57 drivers/net/phy/mdio-xpcs.c Jose Abreu     2020-03-09  828  	u32 id;
fcb26bd2b6cab57 drivers/net/phy/mdio-xpcs.c Jose Abreu     2020-03-09  829  
b97b5331b8ab7f6 drivers/net/pcs/pcs-xpcs.c  Ong Boon Leong 2021-03-15  830  	/* First, search C73 PCS using PCS MMD */
fcb26bd2b6cab57 drivers/net/phy/mdio-xpcs.c Jose Abreu     2020-03-09  831  	ret = xpcs_read(xpcs, MDIO_MMD_PCS, MII_PHYSID1);
fcb26bd2b6cab57 drivers/net/phy/mdio-xpcs.c Jose Abreu     2020-03-09  832  	if (ret < 0)
fcb26bd2b6cab57 drivers/net/phy/mdio-xpcs.c Jose Abreu     2020-03-09  833  		return 0xffffffff;
fcb26bd2b6cab57 drivers/net/phy/mdio-xpcs.c Jose Abreu     2020-03-09  834  
fcb26bd2b6cab57 drivers/net/phy/mdio-xpcs.c Jose Abreu     2020-03-09  835  	id = ret << 16;
fcb26bd2b6cab57 drivers/net/phy/mdio-xpcs.c Jose Abreu     2020-03-09  836  
fcb26bd2b6cab57 drivers/net/phy/mdio-xpcs.c Jose Abreu     2020-03-09  837  	ret = xpcs_read(xpcs, MDIO_MMD_PCS, MII_PHYSID2);
fcb26bd2b6cab57 drivers/net/phy/mdio-xpcs.c Jose Abreu     2020-03-09  838  	if (ret < 0)
fcb26bd2b6cab57 drivers/net/phy/mdio-xpcs.c Jose Abreu     2020-03-09  839  		return 0xffffffff;
fcb26bd2b6cab57 drivers/net/phy/mdio-xpcs.c Jose Abreu     2020-03-09  840  
b97b5331b8ab7f6 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 */
b97b5331b8ab7f6 drivers/net/pcs/pcs-xpcs.c  Ong Boon Leong 2021-03-15  842  	if (id | ret)
fcb26bd2b6cab57 drivers/net/phy/mdio-xpcs.c Jose Abreu     2020-03-09 @843  		return id | ret;
b97b5331b8ab7f6 drivers/net/pcs/pcs-xpcs.c  Ong Boon Leong 2021-03-15  844  
b97b5331b8ab7f6 drivers/net/pcs/pcs-xpcs.c  Ong Boon Leong 2021-03-15  845  	/* Next, search C37 PCS using Vendor-Specific MII MMD */
b97b5331b8ab7f6 drivers/net/pcs/pcs-xpcs.c  Ong Boon Leong 2021-03-15  846  	ret = xpcs_read(xpcs, MDIO_MMD_VEND2, MII_PHYSID1);
b97b5331b8ab7f6 drivers/net/pcs/pcs-xpcs.c  Ong Boon Leong 2021-03-15  847  	if (ret < 0)
b97b5331b8ab7f6 drivers/net/pcs/pcs-xpcs.c  Ong Boon Leong 2021-03-15  848  		return 0xffffffff;
b97b5331b8ab7f6 drivers/net/pcs/pcs-xpcs.c  Ong Boon Leong 2021-03-15  849  
b97b5331b8ab7f6 drivers/net/pcs/pcs-xpcs.c  Ong Boon Leong 2021-03-15  850  	id = ret << 16;
b97b5331b8ab7f6 drivers/net/pcs/pcs-xpcs.c  Ong Boon Leong 2021-03-15  851  
b97b5331b8ab7f6 drivers/net/pcs/pcs-xpcs.c  Ong Boon Leong 2021-03-15  852  	ret = xpcs_read(xpcs, MDIO_MMD_VEND2, MII_PHYSID2);
b97b5331b8ab7f6 drivers/net/pcs/pcs-xpcs.c  Ong Boon Leong 2021-03-15  853  	if (ret < 0)
b97b5331b8ab7f6 drivers/net/pcs/pcs-xpcs.c  Ong Boon Leong 2021-03-15  854  		return 0xffffffff;
b97b5331b8ab7f6 drivers/net/pcs/pcs-xpcs.c  Ong Boon Leong 2021-03-15  855  
b97b5331b8ab7f6 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 */
b97b5331b8ab7f6 drivers/net/pcs/pcs-xpcs.c  Ong Boon Leong 2021-03-15  857  	if (id | ret)
b97b5331b8ab7f6 drivers/net/pcs/pcs-xpcs.c  Ong Boon Leong 2021-03-15  858  		return id | ret;
b97b5331b8ab7f6 drivers/net/pcs/pcs-xpcs.c  Ong Boon Leong 2021-03-15  859  
b97b5331b8ab7f6 drivers/net/pcs/pcs-xpcs.c  Ong Boon Leong 2021-03-15  860  	return 0xffffffff;
fcb26bd2b6cab57 drivers/net/phy/mdio-xpcs.c Jose Abreu     2020-03-09  861  }
fcb26bd2b6cab57 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* drivers/net/pcs/pcs-xpcs.c:843:13: warning: Identical inner 'return' condition is always true. [identicalInnerCondition]
@ 2021-12-15 14:34 kernel test robot
  0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2021-12-15 14:34 UTC (permalink / raw)
  To: kbuild

[-- 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* drivers/net/pcs/pcs-xpcs.c:843:13: warning: Identical inner 'return' condition is always true. [identicalInnerCondition]
@ 2021-11-11 12:20 kernel test robot
  0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2021-11-11 12:20 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 5652 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:   debe436e77c72fcee804fb867f275e6d31aa999c
commit: b97b5331b8ab7f60fb880e0c31c9b09b73d2fa4e net: pcs: add C37 SGMII AN support for intel mGbE controller
date:   8 months ago
:::::: branch date: 11 hours ago
:::::: commit date: 8 months ago
compiler: arm-linux-gnueabi-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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* drivers/net/pcs/pcs-xpcs.c:843:13: warning: Identical inner 'return' condition is always true. [identicalInnerCondition]
@ 2021-08-12  8:59 kernel test robot
  0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2021-08-12  8:59 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 5646 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:   761c6d7ec820f123b931e7b8ef7ec7c8564e450f
commit: b97b5331b8ab7f60fb880e0c31c9b09b73d2fa4e net: pcs: add C37 SGMII AN support for intel mGbE controller
date:   5 months ago
:::::: branch date: 30 hours ago
:::::: commit date: 5 months ago
compiler: h8300-linux-gcc (GCC) 10.3.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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-02-04  1:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-03  0:18 drivers/net/pcs/pcs-xpcs.c:843:13: warning: Identical inner 'return' condition is always true. [identicalInnerCondition] kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2022-02-04  1:28 kernel test robot
2021-12-15 14:34 kernel test robot
2021-11-11 12:20 kernel test robot
2021-08-12  8:59 kernel test robot

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.