Messages in this thread | | | Date | Mon, 15 Aug 2022 07:49:33 +0800 | From | kernel test robot <> | Subject | [thermal:thermal/linux-next 83/83] drivers/net/ethernet/mellanox/mlxsw/core_thermal.c:409:13: warning: variable 'err' set but not used |
| |
tree: git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git thermal/linux-next head: 9b5e2c897cd182a5802878a56fb7fbef36b22dfb commit: 9b5e2c897cd182a5802878a56fb7fbef36b22dfb [83/83] Revert "mlxsw: core: Add the hottest thermal zone detection" config: alpha-randconfig-r032-20220814 (https://download.01.org/0day-ci/archive/20220815/202208150708.fk6sfd8u-lkp@intel.com/config) compiler: alpha-linux-gcc (GCC) 12.1.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/thermal/linux.git/commit/?id=9b5e2c897cd182a5802878a56fb7fbef36b22dfb git remote add thermal git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git git fetch --no-tags thermal thermal/linux-next git checkout 9b5e2c897cd182a5802878a56fb7fbef36b22dfb # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=alpha SHELL=/bin/bash 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/mlxsw/core_thermal.c: In function 'mlxsw_thermal_module_temp_get': >> drivers/net/ethernet/mellanox/mlxsw/core_thermal.c:409:13: warning: variable 'err' set but not used [-Wunused-but-set-variable] 409 | int err; | ^~~
vim +/err +409 drivers/net/ethernet/mellanox/mlxsw/core_thermal.c
e57977b34ab5d5 Mykola Kostenok 2021-06-08 400 6a79507cfe94c7 Vadim Pasternak 2019-02-14 401 static int mlxsw_thermal_module_temp_get(struct thermal_zone_device *tzdev, 6a79507cfe94c7 Vadim Pasternak 2019-02-14 402 int *p_temp) 6a79507cfe94c7 Vadim Pasternak 2019-02-14 403 { 6a79507cfe94c7 Vadim Pasternak 2019-02-14 404 struct mlxsw_thermal_module *tz = tzdev->devdata; 6a79507cfe94c7 Vadim Pasternak 2019-02-14 405 struct mlxsw_thermal *thermal = tz->parent; 72a64c2fe9d8a0 Mykola Kostenok 2021-06-08 406 int temp, crit_temp, emerg_temp; e57977b34ab5d5 Mykola Kostenok 2021-06-08 407 struct device *dev; e57977b34ab5d5 Mykola Kostenok 2021-06-08 408 u16 sensor_index; 6a79507cfe94c7 Vadim Pasternak 2019-02-14 @409 int err; 6a79507cfe94c7 Vadim Pasternak 2019-02-14 410 e57977b34ab5d5 Mykola Kostenok 2021-06-08 411 dev = thermal->bus_info->dev; e57977b34ab5d5 Mykola Kostenok 2021-06-08 412 sensor_index = MLXSW_REG_MTMP_MODULE_INDEX_MIN + tz->module; e57977b34ab5d5 Mykola Kostenok 2021-06-08 413 e57977b34ab5d5 Mykola Kostenok 2021-06-08 414 /* Read module temperature and thresholds. */ e57977b34ab5d5 Mykola Kostenok 2021-06-08 415 mlxsw_thermal_module_temp_and_thresholds_get(thermal->core, 72a64c2fe9d8a0 Mykola Kostenok 2021-06-08 416 sensor_index, &temp, 72a64c2fe9d8a0 Mykola Kostenok 2021-06-08 417 &crit_temp, &emerg_temp); f485cc36b0a7d7 Vadim Pasternak 2019-06-24 418 *p_temp = temp; e4e93d6d865113 Vadim Pasternak 2019-05-29 419 e4e93d6d865113 Vadim Pasternak 2019-05-29 420 if (!temp) e4e93d6d865113 Vadim Pasternak 2019-05-29 421 return 0; e4e93d6d865113 Vadim Pasternak 2019-05-29 422 e4e93d6d865113 Vadim Pasternak 2019-05-29 423 /* Update trip points. */ 72a64c2fe9d8a0 Mykola Kostenok 2021-06-08 424 err = mlxsw_thermal_module_trips_update(dev, thermal->core, tz, 72a64c2fe9d8a0 Mykola Kostenok 2021-06-08 425 crit_temp, emerg_temp); e4e93d6d865113 Vadim Pasternak 2019-05-29 426 6a79507cfe94c7 Vadim Pasternak 2019-02-14 427 return 0; 6a79507cfe94c7 Vadim Pasternak 2019-02-14 428 } 6a79507cfe94c7 Vadim Pasternak 2019-02-14 429
:::::: The code at line 409 was first introduced by commit :::::: 6a79507cfe94c7729207659501ff88914b3eb198 mlxsw: core: Extend thermal module with per QSFP module thermal zones
:::::: TO: Vadim Pasternak <vadimp@mellanox.com> :::::: CC: David S. Miller <davem@davemloft.net>
-- 0-DAY CI Kernel Test Service https://01.org/lkp
| |