From: kernel test robot <lkp@intel.com>
To: Petr Machata <petrm@nvidia.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Danielle Ratson <danieller@nvidia.com>
Subject: [jpirko-mlxsw:combined_queue 76/94] drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:9834:34: warning: variable 'rif' is uninitialized when used here
Date: Tue, 13 Jun 2023 10:30:46 +0800 [thread overview]
Message-ID: <202306131041.qUsgJbAX-lkp@intel.com> (raw)
tree: https://github.com/jpirko/linux_mlxsw combined_queue
head: 3cfb81e62be1e484eed57086d87ac32038f50fa5
commit: 5efc31463b07489a9a3cec153a696c93d0a3a6a6 [76/94] mlxsw: spectrum_router: Replay IP NETDEV_UP on device enslavement
config: i386-randconfig-i004-20230612 (https://download.01.org/0day-ci/archive/20230613/202306131041.qUsgJbAX-lkp@intel.com/config)
compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project.git 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a)
reproduce (this is a W=1 build):
mkdir -p ~/bin
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/jpirko/linux_mlxsw/commit/5efc31463b07489a9a3cec153a696c93d0a3a6a6
git remote add jpirko-mlxsw https://github.com/jpirko/linux_mlxsw
git fetch --no-tags jpirko-mlxsw combined_queue
git checkout 5efc31463b07489a9a3cec153a696c93d0a3a6a6
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=i386 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/gpio/ drivers/net/ethernet/mellanox/mlxsw/ sound/soc/
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202306131041.qUsgJbAX-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:9834:34: warning: variable 'rif' is uninitialized when used here [-Wuninitialized]
if (!mlxsw_sp_rif_should_config(rif, dev, NETDEV_UP))
^~~
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:9821:26: note: initialize the variable 'rif' to silence this warning
struct mlxsw_sp_rif *rif;
^
= NULL
1 warning generated.
vim +/rif +9834 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
9815
9816 static int mlxsw_sp_router_unreplay_inetaddr_up(struct net_device *dev,
9817 struct netdev_nested_priv *priv)
9818 {
9819 struct mlxsw_sp_router_replay_inetaddr_up *ctx = priv->data;
9820 struct mlxsw_sp_crif *crif;
9821 struct mlxsw_sp_rif *rif;
9822
9823 if (!ctx->done)
9824 return 0;
9825
9826 if (mlxsw_sp_dev_addr_list_empty(dev))
9827 return 0;
9828
9829 crif = mlxsw_sp_crif_lookup(ctx->mlxsw_sp->router, dev);
9830 if (!crif || !crif->rif)
9831 return 0;
9832
9833 /* We are rolling back NETDEV_UP, so ask for that. */
> 9834 if (!mlxsw_sp_rif_should_config(rif, dev, NETDEV_UP))
9835 return 0;
9836
9837 __mlxsw_sp_inetaddr_event(ctx->mlxsw_sp, dev, NETDEV_DOWN, false, NULL);
9838
9839 ctx->done--;
9840 return 0;
9841 }
9842
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2023-06-13 2:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202306131041.qUsgJbAX-lkp@intel.com \
--to=lkp@intel.com \
--cc=danieller@nvidia.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=petrm@nvidia.com \
/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.