[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202205120232.oCAO8rb3-lkp@intel.com>
Date: Thu, 12 May 2022 02:50:40 +0800
From: kernel test robot <lkp@...el.com>
To: Michael Shych <michaelsh@...dia.com>
Cc: kbuild-all@...ts.01.org,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Hans de Goede <hdegoede@...hat.com>,
linux-kernel@...r.kernel.org, Vadim Pasternak <vadimp@...dia.com>
Subject: [pdx86-platform-drivers-x86:review-hans 40/59]
drivers/platform/mellanox/nvsw-sn2201.c:942:16: warning: variable 'j' set
but not used
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@...el.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
Powered by blists - more mailing lists