* [pdx86-platform-drivers-x86:review-hans 40/59] drivers/platform/mellanox/nvsw-sn2201.c:942:16: warning: variable 'j' set but not used
@ 2022-05-11 18:50 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-05-11 18:50 UTC (permalink / raw)
To: Michael Shych
Cc: kbuild-all, Andy Shevchenko, Hans de Goede, linux-kernel,
Vadim Pasternak
tree: https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git review-hans
head: 57709a27d9744f5af4bbeec3ba3105c6aa1075eb
commit: 9e267f050444fa018c9a06b0cc07effac084b920 [40/59] platform/mellanox: Add support for new SN2201 system
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20220512/202205120232.oCAO8rb3-lkp@intel.com/config)
compiler: sh4-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://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/commit/?id=9e267f050444fa018c9a06b0cc07effac084b920
git remote add pdx86-platform-drivers-x86 https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git
git fetch --no-tags pdx86-platform-drivers-x86 review-hans
git checkout 9e267f050444fa018c9a06b0cc07effac084b920
# 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=sh SHELL=/bin/bash drivers/platform/mellanox/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/platform/mellanox/nvsw-sn2201.c: In function 'nvsw_sn2201_config_post_init':
>> drivers/platform/mellanox/nvsw-sn2201.c:942:16: warning: variable 'j' set but not used [-Wunused-but-set-variable]
942 | int i, j, err;
| ^
vim +/j +942 drivers/platform/mellanox/nvsw-sn2201.c
936
937 static int nvsw_sn2201_config_post_init(struct nvsw_sn2201 *nvsw_sn2201)
938 {
939 struct mlxreg_hotplug_device *sn2201_dev;
940 struct i2c_adapter *adap;
941 struct device *dev;
> 942 int i, j, err;
943
944 dev = nvsw_sn2201->dev;
945 adap = i2c_get_adapter(nvsw_sn2201->main_mux_deferred_nr);
946 if (!adap) {
947 dev_err(dev, "Failed to get adapter for bus %d\n",
948 nvsw_sn2201->main_mux_deferred_nr);
949 return -ENODEV;
950 }
951 i2c_put_adapter(adap);
952
953 /* Update board info. */
954 sn2201_dev = nvsw_sn2201->sn2201_devs;
955 for (i = 0, j = 0; i < nvsw_sn2201->sn2201_devs_num; i++, sn2201_dev++) {
956 sn2201_dev->adapter = i2c_get_adapter(sn2201_dev->nr);
957 if (!sn2201_dev->adapter)
958 return -ENODEV;
959 i2c_put_adapter(sn2201_dev->adapter);
960 }
961
962 err = nvsw_sn2201_create_static_devices(nvsw_sn2201, nvsw_sn2201->sn2201_devs,
963 nvsw_sn2201->sn2201_devs_num);
964 if (err)
965 dev_err(dev, "Failed to create static devices\n");
966
967 return err;
968 }
969
--
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-05-11 18:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-11 18:50 [pdx86-platform-drivers-x86:review-hans 40/59] drivers/platform/mellanox/nvsw-sn2201.c:942:16: warning: variable 'j' set but not used 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.