* [linux-next:master 2212/3682] drivers/net/ethernet/mellanox/mlx5/core/en_rep.c:481:6: warning: variable 'err' is used uninitialized whenever 'if' condition is false
@ 2022-08-27 5:50 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-08-27 5:50 UTC (permalink / raw)
To: Roi Dayan
Cc: llvm, kbuild-all, Linux Memory Management List, Saeed Mahameed,
Mark Bloch, Maor Dickman
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 8d0c42c9e80791e8baba2932d2cbd2dcead50d47
commit: 430e2d5e2a982e6f86866762e6d6eb78191f9677 [2212/3682] net/mlx5: E-Switch, Move send to vport meta rule creation
config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20220827/202208271304.MimlzZvl-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=430e2d5e2a982e6f86866762e6d6eb78191f9677
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 430e2d5e2a982e6f86866762e6d6eb78191f9677
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/net/ethernet/mellanox/mlx5/core/ drivers/net/ethernet/mellanox/mlxsw/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/net/ethernet/mellanox/mlx5/core/en_rep.c:481:6: warning: variable 'err' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (IS_ERR(flow_rule)) {
^~~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c:489:9: note: uninitialized use occurs here
return err;
^~~
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c:481:2: note: remove the 'if' if its condition is always true
if (IS_ERR(flow_rule)) {
^~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c:474:9: note: initialize the variable 'err' to silence this warning
int err;
^
= 0
1 warning generated.
vim +481 drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
465
466 static int
467 mlx5e_rep_add_meta_tunnel_rule(struct mlx5e_priv *priv)
468 {
469 struct mlx5_eswitch *esw = priv->mdev->priv.eswitch;
470 struct mlx5e_rep_priv *rpriv = priv->ppriv;
471 struct mlx5_eswitch_rep *rep = rpriv->rep;
472 struct mlx5_flow_handle *flow_rule;
473 struct mlx5_flow_group *g;
474 int err;
475
476 g = esw->fdb_table.offloads.send_to_vport_meta_grp;
477 if (!g)
478 return 0;
479
480 flow_rule = mlx5_eswitch_add_send_to_vport_meta_rule(esw, rep->vport);
> 481 if (IS_ERR(flow_rule)) {
482 err = PTR_ERR(flow_rule);
483 goto out;
484 }
485
486 rpriv->send_to_vport_meta_rule = flow_rule;
487
488 out:
489 return err;
490 }
491
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-08-27 5:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-27 5:50 [linux-next:master 2212/3682] drivers/net/ethernet/mellanox/mlx5/core/en_rep.c:481:6: warning: variable 'err' is used uninitialized whenever 'if' condition is false kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox