All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:4452:9: warning: Identical condition 'err', second condition is always false
Date: Sun, 11 Oct 2020 23:07:18 +0800	[thread overview]
Message-ID: <202010112312.bhNPrMCA-lkp@intel.com> (raw)

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

             reply	other threads:[~2020-10-11 15:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-11 15:07 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-09-17 22:57 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:4452:9: warning: Identical condition 'err', second condition is always false 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=202010112312.bhNPrMCA-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.