[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202508070319.QMV6021c-lkp@intel.com>
Date: Thu, 7 Aug 2025 03:21:33 +0800
From: kernel test robot <lkp@...el.com>
To: Chris Packham <chris.packham@...iedtelesis.co.nz>, jdelvare@...e.com,
linux@...ck-us.net, robh@...nel.org, krzk+dt@...nel.org,
conor+dt@...nel.org
Cc: oe-kbuild-all@...ts.linux.dev, linux-hwmon@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
Chris Packham <chris.packham@...iedtelesis.co.nz>
Subject: Re: [PATCH 2/2] hwmon: (ina780) Add driver for TI INA780
Hi Chris,
kernel test robot noticed the following build warnings:
[auto build test WARNING on groeck-staging/hwmon-next]
[also build test WARNING on linus/master v6.16 next-20250806]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Chris-Packham/hwmon-ina780-Add-driver-for-TI-INA780/20250806-115131
base: https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next
patch link: https://lore.kernel.org/r/20250806005127.542298-2-chris.packham%40alliedtelesis.co.nz
patch subject: [PATCH 2/2] hwmon: (ina780) Add driver for TI INA780
config: x86_64-randconfig-072-20250807 (https://download.01.org/0day-ci/archive/20250807/202508070319.QMV6021c-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14+deb12u1) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250807/202508070319.QMV6021c-lkp@intel.com/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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202508070319.QMV6021c-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/hwmon/ina780.c: In function 'ina780_read_temp':
>> drivers/hwmon/ina780.c:293:18: warning: variable 'mask' set but not used [-Wunused-but-set-variable]
293 | int reg, mask;
| ^~~~
vim +/mask +293 drivers/hwmon/ina780.c
289
290 static int ina780_read_temp(struct device *dev, u32 attr, long *val)
291 {
292 struct ina780_data *data = dev_get_drvdata(dev);
> 293 int reg, mask;
294 int regval;
295 int err;
296
297 switch (attr) {
298 case hwmon_temp_input:
299 reg = INA780_DIETEMP;
300 break;
301 case hwmon_temp_max:
302 reg = INA780_TEMP_LIMIT;
303 break;
304 case hwmon_temp_max_alarm:
305 reg = INA780_DIAG_ALRT;
306 mask = INA780_DIAG_ALRT_TMPOL;
307 break;
308 default:
309 return -EOPNOTSUPP;
310 }
311
312 switch (attr) {
313 case hwmon_temp_input:
314 case hwmon_temp_max:
315 err = regmap_read(data->regmap, reg, ®val);
316 if (err)
317 return err;
318 *val = div_s64(((s64)((s16)regval) >> 4) * INA780_TEMP_LSB, 1000);
319 break;
320 case hwmon_temp_max_alarm:
321 err = regmap_read(data->regmap, INA780_DIAG_ALRT, ®val);
322 *val = !!(regval & INA780_DIAG_ALRT_TMPOL);
323 break;
324 }
325
326 return 0;
327 }
328
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists