mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Chris Packham <chris.packham@alliedtelesis.co.nz>,
	jdelvare@suse.com, linux@roeck-us.net, robh@kernel.org,
	krzk+dt@kernel.org, conor+dt@kernel.org
Cc: oe-kbuild-all@lists.linux.dev, linux-hwmon@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Chris Packham <chris.packham@alliedtelesis.co.nz>
Subject: Re: [PATCH 2/2] hwmon: (ina780) Add driver for TI INA780
Date: Thu, 7 Aug 2025 03:21:33 +0800	[thread overview]
Message-ID: <202508070319.QMV6021c-lkp@intel.com> (raw)
In-Reply-To: <20250806005127.542298-2-chris.packham@alliedtelesis.co.nz>

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@intel.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, &regval);
   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, &regval);
   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

  parent reply	other threads:[~2025-08-06 19:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-06  0:51 [PATCH 1/2] dt-bindings: hwmon: ti,ina780a: Add INA780 device Chris Packham
2025-08-06  0:51 ` [PATCH 2/2] hwmon: (ina780) Add driver for TI INA780 Chris Packham
2025-08-06  3:14   ` Guenter Roeck
2025-08-06  3:41     ` Chris Packham
2025-08-06 20:22       ` Guenter Roeck
2025-08-06 19:21   ` kernel test robot [this message]
2025-08-06  6:32 ` [PATCH 1/2] dt-bindings: hwmon: ti,ina780a: Add INA780 device Krzysztof Kozlowski
2025-08-07 20:46   ` Chris Packham
2025-08-08  7:16     ` Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202508070319.QMV6021c-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=chris.packham@alliedtelesis.co.nz \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jdelvare@suse.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®