Re: [PATCH v5 04/11] pwm: max7360: Add MAX7360 PWM support
From: kernel test robot
Date: Wed Mar 19 2025 - 08:58:50 EST
Hi,
kernel test robot noticed the following build warnings:
[auto build test WARNING on a64dcfb451e254085a7daee5fe51bf22959d52d3]
url: https://github.com/intel-lab-lkp/linux/commits/Mathieu-Dubois-Briand/dt-bindings-mfd-gpio-Add-MAX7360/20250319-003750
base: a64dcfb451e254085a7daee5fe51bf22959d52d3
patch link: https://lore.kernel.org/r/20250318-mdb-max7360-support-v5-4-fb20baf97da0%40bootlin.com
patch subject: [PATCH v5 04/11] pwm: max7360: Add MAX7360 PWM support
config: m68k-allmodconfig (https://download.01.org/0day-ci/archive/20250319/202503192044.ICDBVYzc-lkp@xxxxxxxxx/config)
compiler: m68k-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250319/202503192044.ICDBVYzc-lkp@xxxxxxxxx/reproduce)
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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202503192044.ICDBVYzc-lkp@xxxxxxxxx/
All warnings (new ones prefixed by >>):
drivers/pwm/pwm-max7360.c: In function 'max7360_pwm_request':
>> drivers/pwm/pwm-max7360.c:41:17: warning: variable 'dev' set but not used [-Wunused-but-set-variable]
struct device *dev;
^~~
drivers/pwm/pwm-max7360.c: In function 'max7360_pwm_free':
drivers/pwm/pwm-max7360.c:58:17: warning: variable 'dev' set but not used [-Wunused-but-set-variable]
struct device *dev;
^~~
vim +/dev +41 drivers/pwm/pwm-max7360.c
37
38 static int max7360_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm)
39 {
40 struct regmap *regmap;
> 41 struct device *dev;
42 int ret;
43
44 regmap = pwmchip_get_drvdata(chip);
45 dev = regmap_get_device(regmap);
46
47 ret = regmap_write_bits(regmap, MAX7360_REG_PWMCFG(pwm->hwpwm),
48 MAX7360_PORT_CFG_COMMON_PWM, 0);
49 if (ret)
50 return ret;
51
52 return regmap_write_bits(regmap, MAX7360_REG_PORTS, BIT(pwm->hwpwm), BIT(pwm->hwpwm));
53 }
54
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki