[openeuler:openEuler-1.0-LTS 1605/1605] drivers/pwm/pwm-pca9685.c:173:21: warning: variable 'pwm' set but not used

tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 382711115afc1197da2c288679079946650ef017 commit: 0e0a61eb0d758e7fd91a0543e7d12fc065df5b70 [1605/1605] pwm: Clear chip_data in pwm_put() config: x86_64-buildonly-randconfig-2004-20250501 (https://download.01.org/0day-ci/archive/20250703/202507030648.wv6Tc1L9-lkp@i...) compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250703/202507030648.wv6Tc1L9-lkp@i...) 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/202507030648.wv6Tc1L9-lkp@intel.com/ All warnings (new ones prefixed by >>):
drivers/pwm/pwm-pca9685.c:173:21: warning: variable 'pwm' set but not used [-Wunused-but-set-variable] 173 | struct pwm_device *pwm; | ^ 1 warning generated.
vim +/pwm +173 drivers/pwm/pwm-pca9685.c bccec89f0a35f65 Mika Westerberg 2016-09-20 169 c40c461e1944b9c Sven Van Asbroeck 2017-04-13 170 static void pca9685_pwm_gpio_free(struct gpio_chip *gpio, unsigned int offset) c40c461e1944b9c Sven Van Asbroeck 2017-04-13 171 { c40c461e1944b9c Sven Van Asbroeck 2017-04-13 172 struct pca9685 *pca = gpiochip_get_data(gpio); c40c461e1944b9c Sven Van Asbroeck 2017-04-13 @173 struct pwm_device *pwm; c40c461e1944b9c Sven Van Asbroeck 2017-04-13 174 c40c461e1944b9c Sven Van Asbroeck 2017-04-13 175 pca9685_pwm_gpio_set(gpio, offset, 0); c40c461e1944b9c Sven Van Asbroeck 2017-04-13 176 pm_runtime_put(pca->chip.dev); c40c461e1944b9c Sven Van Asbroeck 2017-04-13 177 mutex_lock(&pca->lock); c40c461e1944b9c Sven Van Asbroeck 2017-04-13 178 pwm = &pca->chip.pwms[offset]; c40c461e1944b9c Sven Van Asbroeck 2017-04-13 179 mutex_unlock(&pca->lock); c40c461e1944b9c Sven Van Asbroeck 2017-04-13 180 } c40c461e1944b9c Sven Van Asbroeck 2017-04-13 181 :::::: The code at line 173 was first introduced by commit :::::: c40c461e1944b9cfb520e04184ec1e5c80fb210b pwm: pca9685: Fix GPIO-only operation :::::: TO: Sven Van Asbroeck <thesven73@gmail.com> :::::: CC: Thierry Reding <thierry.reding@gmail.com> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
participants (1)
-
kernel test robot