lkml.org 
[lkml]   [2022]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[jpirko-mlxsw:jiri_devel_devlink_locking 29/31] drivers/net/netdevsim/dev.c:946:30: warning: variable 'nsim_bus_dev' set but not used
tree:   https://github.com/jpirko/linux_mlxsw jiri_devel_devlink_locking
head: 34fad48fbf94ea603412cfc9375b958ef38fa3e0
commit: 1b1a655315d99a84b3f065d9f950fab8358114d5 [29/31] netdevsim: convert driver to devlink unlocked API during init/fini
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20220707/202207071338.SYuecpQ6-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 11.3.0
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://github.com/jpirko/linux_mlxsw/commit/1b1a655315d99a84b3f065d9f950fab8358114d5
git remote add jpirko-mlxsw https://github.com/jpirko/linux_mlxsw
git fetch --no-tags jpirko-mlxsw jiri_devel_devlink_locking
git checkout 1b1a655315d99a84b3f065d9f950fab8358114d5
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=alpha SHELL=/bin/bash drivers/gpio/ drivers/net/netdevsim/ drivers/tty/serial/

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/netdevsim/dev.c: In function 'nsim_dev_reload_down':
>> drivers/net/netdevsim/dev.c:946:30: warning: variable 'nsim_bus_dev' set but not used [-Wunused-but-set-variable]
946 | struct nsim_bus_dev *nsim_bus_dev;
| ^~~~~~~~~~~~
drivers/net/netdevsim/dev.c: In function 'nsim_dev_reload_up':
drivers/net/netdevsim/dev.c:970:30: warning: variable 'nsim_bus_dev' set but not used [-Wunused-but-set-variable]
970 | struct nsim_bus_dev *nsim_bus_dev;
| ^~~~~~~~~~~~


vim +/nsim_bus_dev +946 drivers/net/netdevsim/dev.c

75ba029f3c07f47 Jiri Pirko 2019-10-03 940
070c63f20f6c739 Jiri Pirko 2019-10-03 941 static int nsim_dev_reload_down(struct devlink *devlink, bool netns_change,
dc64cc7c63102ac Moshe Shemesh 2020-10-07 942 enum devlink_reload_action action, enum devlink_reload_limit limit,
dc64cc7c63102ac Moshe Shemesh 2020-10-07 943 struct netlink_ext_ack *extack)
97691069dc5a413 Jiri Pirko 2019-09-12 944 {
75ba029f3c07f47 Jiri Pirko 2019-10-03 945 struct nsim_dev *nsim_dev = devlink_priv(devlink);
23809a726c0d004 Leon Romanovsky 2021-08-05 @946 struct nsim_bus_dev *nsim_bus_dev;
23809a726c0d004 Leon Romanovsky 2021-08-05 947
1b1a655315d99a8 Jiri Pirko 2022-07-01 948 devl_lock(devlink);
23809a726c0d004 Leon Romanovsky 2021-08-05 949 nsim_bus_dev = nsim_dev->nsim_bus_dev;
75ba029f3c07f47 Jiri Pirko 2019-10-03 950
155ddfc5e54a68f Jiri Pirko 2019-10-06 951 if (nsim_dev->dont_allow_reload) {
155ddfc5e54a68f Jiri Pirko 2019-10-06 952 /* For testing purposes, user set debugfs dont_allow_reload
155ddfc5e54a68f Jiri Pirko 2019-10-06 953 * value to true. So forbid it.
155ddfc5e54a68f Jiri Pirko 2019-10-06 954 */
f9867b51d268d6f Colin Ian King 2019-10-08 955 NL_SET_ERR_MSG_MOD(extack, "User forbid the reload for testing purposes");
1b1a655315d99a8 Jiri Pirko 2022-07-01 956 devl_unlock(devlink);
155ddfc5e54a68f Jiri Pirko 2019-10-06 957 return -EOPNOTSUPP;
155ddfc5e54a68f Jiri Pirko 2019-10-06 958 }
155ddfc5e54a68f Jiri Pirko 2019-10-06 959
75ba029f3c07f47 Jiri Pirko 2019-10-03 960 nsim_dev_reload_destroy(nsim_dev);
1b1a655315d99a8 Jiri Pirko 2022-07-01 961 devl_unlock(devlink);
97691069dc5a413 Jiri Pirko 2019-09-12 962 return 0;
97691069dc5a413 Jiri Pirko 2019-09-12 963 }
97691069dc5a413 Jiri Pirko 2019-09-12 964

:::::: The code at line 946 was first introduced by commit
:::::: 23809a726c0d004b9d2474333181f8da07360469 netdevsim: Forbid devlink reload when adding or deleting ports

:::::: TO: Leon Romanovsky <leonro@nvidia.com>
:::::: CC: David S. Miller <davem@davemloft.net>

--
0-DAY CI Kernel Test Service
https://01.org/lkp

\
 
 \ /
  Last update: 2022-07-07 07:50    [W:1.118 / U:1.876 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site