All of lore.kernel.org
 help / color / mirror / Atom feed
* drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:4452:9: warning: Identical condition 'err', second condition is always false
@ 2020-10-11 15:07 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2020-10-11 15:07 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 2579 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Ido Schimmel <idosch@mellanox.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   da690031a5d6d50a361e3f19f3eeabd086a6f20d
commit: ee5a0448e72b0857260e04f68126b2bfa27c154e mlxsw: spectrum_router: Set hardware flags for routes
date:   9 months ago
:::::: branch date: 16 hours ago
:::::: commit date: 9 months ago
compiler: mips64-linux-gcc (GCC) 9.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/ethernet/mellanox/mlxsw/spectrum_router.c:4452:9: warning: Identical condition 'err', second condition is always false [identicalConditionAfterEarlyExit]
    return err;
           ^
   drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:4447:6: note: first condition
    if (err)
        ^
   drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:4452:9: note: second condition
    return err;
           ^

vim +/err +4452 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c

61c503f976b544 Jiri Pirko   2016-07-04  4440  
61c503f976b544 Jiri Pirko   2016-07-04  4441  static int mlxsw_sp_fib_entry_op(struct mlxsw_sp *mlxsw_sp,
61c503f976b544 Jiri Pirko   2016-07-04  4442  				 struct mlxsw_sp_fib_entry *fib_entry,
61c503f976b544 Jiri Pirko   2016-07-04  4443  				 enum mlxsw_reg_ralue_op op)
61c503f976b544 Jiri Pirko   2016-07-04  4444  {
9dbf4d76d07d3b Ido Schimmel 2017-07-18  4445  	int err = __mlxsw_sp_fib_entry_op(mlxsw_sp, fib_entry, op);
013b20f953ab01 Ido Schimmel 2017-02-08  4446  
ee5a0448e72b08 Ido Schimmel 2020-01-14  4447  	if (err)
ee5a0448e72b08 Ido Schimmel 2020-01-14  4448  		return err;
ee5a0448e72b08 Ido Schimmel 2020-01-14  4449  
ee5a0448e72b08 Ido Schimmel 2020-01-14  4450  	mlxsw_sp_fib_entry_hw_flags_refresh(mlxsw_sp, fib_entry, op);
9dbf4d76d07d3b Ido Schimmel 2017-07-18  4451  
013b20f953ab01 Ido Schimmel 2017-02-08 @4452  	return err;
61c503f976b544 Jiri Pirko   2016-07-04  4453  }
61c503f976b544 Jiri Pirko   2016-07-04  4454  

:::::: The code at line 4452 was first introduced by commit
:::::: 013b20f953ab011ffb5d203a07b981bad16342f4 mlxsw: spectrum_router: More accurately set offload flag

:::::: TO: Ido Schimmel <idosch@mellanox.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] 2+ messages in thread
* drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:4452:9: warning: Identical condition 'err', second condition is always false
@ 2020-09-17 22:57 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2020-09-17 22:57 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 2862 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Ido Schimmel <idosch@mellanox.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   4cbffc461ec91287c4cb1d0e27b01b988d0b8fba
commit: ee5a0448e72b0857260e04f68126b2bfa27c154e mlxsw: spectrum_router: Set hardware flags for routes
date:   8 months ago
:::::: branch date: 4 hours ago
:::::: commit date: 8 months ago
compiler: sparc64-linux-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


cppcheck warnings: (new ones prefixed by >>)

>> drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:4452:9: warning: Identical condition 'err', second condition is always false [identicalConditionAfterEarlyExit]
    return err;
           ^
   drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:4447:6: note: first condition
    if (err)
        ^
   drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:4452:9: note: second condition
    return err;
           ^

# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ee5a0448e72b0857260e04f68126b2bfa27c154e
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout ee5a0448e72b0857260e04f68126b2bfa27c154e
vim +/err +4452 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c

61c503f976b5449 Jiri Pirko   2016-07-04  4440  
61c503f976b5449 Jiri Pirko   2016-07-04  4441  static int mlxsw_sp_fib_entry_op(struct mlxsw_sp *mlxsw_sp,
61c503f976b5449 Jiri Pirko   2016-07-04  4442  				 struct mlxsw_sp_fib_entry *fib_entry,
61c503f976b5449 Jiri Pirko   2016-07-04  4443  				 enum mlxsw_reg_ralue_op op)
61c503f976b5449 Jiri Pirko   2016-07-04  4444  {
9dbf4d76d07d3b5 Ido Schimmel 2017-07-18  4445  	int err = __mlxsw_sp_fib_entry_op(mlxsw_sp, fib_entry, op);
013b20f953ab011 Ido Schimmel 2017-02-08  4446  
ee5a0448e72b085 Ido Schimmel 2020-01-14  4447  	if (err)
ee5a0448e72b085 Ido Schimmel 2020-01-14  4448  		return err;
ee5a0448e72b085 Ido Schimmel 2020-01-14  4449  
ee5a0448e72b085 Ido Schimmel 2020-01-14  4450  	mlxsw_sp_fib_entry_hw_flags_refresh(mlxsw_sp, fib_entry, op);
9dbf4d76d07d3b5 Ido Schimmel 2017-07-18  4451  
013b20f953ab011 Ido Schimmel 2017-02-08 @4452  	return err;
61c503f976b5449 Jiri Pirko   2016-07-04  4453  }
61c503f976b5449 Jiri Pirko   2016-07-04  4454  

:::::: The code at line 4452 was first introduced by commit
:::::: 013b20f953ab011ffb5d203a07b981bad16342f4 mlxsw: spectrum_router: More accurately set offload flag

:::::: TO: Ido Schimmel <idosch@mellanox.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] 2+ messages in thread

end of thread, other threads:[~2020-10-11 15:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-11 15:07 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:4452:9: warning: Identical condition 'err', second condition is always false kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2020-09-17 22:57 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.