mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Wenliang Yan <wenliang202407@163.com>,
	linux@roeck-us.net, Jean Delvare <jdelvare@suse.com>
Cc: oe-kbuild-all@lists.linux.dev,
	Wenliang Yan <wenliang202407@163.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Jonathan Corbet <corbet@lwn.net>,
	linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6 6/8] hwmon: (ina3221) Modify the 'ina3221_read_value' function
Date: Thu, 26 Feb 2026 00:10:54 +0800	[thread overview]
Message-ID: <202602260043.Og6ibhl8-lkp@intel.com> (raw)
In-Reply-To: <20260225090324.112145-7-wenliang202407@163.com>

Hi Wenliang,

kernel test robot noticed the following build warnings:

[auto build test WARNING on groeck-staging/hwmon-next]
[also build test WARNING on robh/for-next linus/master v7.0-rc1 next-20260224]
[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/Wenliang-Yan/dt-bindings-hwmon-ti-ina3221-Add-SQ52210/20260225-171447
base:   https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next
patch link:    https://lore.kernel.org/r/20260225090324.112145-7-wenliang202407%40163.com
patch subject: [PATCH v6 6/8] hwmon: (ina3221) Modify the 'ina3221_read_value' function
config: csky-randconfig-r051-20260225 (https://download.01.org/0day-ci/archive/20260226/202602260043.Og6ibhl8-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 13.4.0

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/202602260043.Og6ibhl8-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> drivers/hwmon/ina3221.c:354:2-3: Unneeded semicolon

vim +354 drivers/hwmon/ina3221.c

   289	
   290	static int ina3221_read_value(struct ina3221_data *ina, unsigned int reg,
   291				      int *val)
   292	{
   293		unsigned int regval;
   294		int ret;
   295	
   296		ret = regmap_read(ina->regmap, reg, &regval);
   297		if (ret)
   298			return ret;
   299	
   300		/*
   301		 * Shunt Voltage Sum register has 14-bit value with 1-bit shift
   302		 * Current registers have 15-bit value
   303		 * Power registers have 16-bit value
   304		 * ALERT_LIMIT registers have 16-bit value with 3-bit shift
   305		 * Other Shunt Voltage registers have 12 bits with 3-bit shift
   306		 */
   307		switch (reg) {
   308		case INA3221_SHUNT_SUM:
   309		case INA3221_CRIT_SUM:
   310			*val = sign_extend32(regval >> 1, 14);
   311			break;
   312		case SQ52210_CURRENT1:
   313		case SQ52210_CURRENT2:
   314		case SQ52210_CURRENT3:
   315			*val = sign_extend32(regval, 15);
   316			break;
   317		case SQ52210_POWER1:
   318		case SQ52210_POWER2:
   319		case SQ52210_POWER3:
   320			*val = regval;
   321			break;
   322		case INA3221_BUS1:
   323		case INA3221_BUS2:
   324		case INA3221_BUS3:
   325		case INA3221_SHUNT1:
   326		case INA3221_SHUNT2:
   327		case INA3221_SHUNT3:
   328		case INA3221_WARN1:
   329		case INA3221_WARN2:
   330		case INA3221_WARN3:
   331		case INA3221_CRIT1:
   332		case INA3221_CRIT2:
   333		case INA3221_CRIT3:
   334			*val = sign_extend32(regval >> 3, 12);
   335			break;
   336		case SQ52210_ALERT_LIMIT1:
   337		case SQ52210_ALERT_LIMIT2:
   338		case SQ52210_ALERT_LIMIT3:
   339			/*
   340			 * This register is a 16-bit register with the lower 3 bits fixed at 0.
   341			 * When used to store bus and shunt alert values, shifting is required.
   342			 * However, for POL (Power Over Limit), it functions as a 16-bit unsigned
   343			 * register where the lower 3 bits being fixed at 0 will result in some
   344			 * loss of precision.
   345			 */
   346			if (ina->alert_type_select & SQ52210_ALERT_ALL_POL_MASK)
   347				*val = regval;
   348			else
   349				*val = sign_extend32(regval >> 3, 12);
   350			break;
   351		default:
   352			*val = 0;
   353			return -EOPNOTSUPP;
 > 354		};
   355		return 0;
   356	}
   357	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  reply	other threads:[~2026-02-25 16:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-25  9:03 [PATCH v6 0/8] hwmon: (ina3221) Various improvement and add support for SQ52210 Wenliang Yan
2026-02-25  9:03 ` [PATCH v6 1/8] dt-bindings: hwmon: ti,ina3221: Add SQ52210 Wenliang Yan
2026-02-25  9:03 ` [PATCH v6 2/8] hwmon: (ina3221) Add support for SQ52210 Wenliang Yan
2026-02-25  9:03 ` [PATCH v6 3/8] hwmon: (ina3221) Pre-calculate current and power LSB Wenliang Yan
2026-02-25  9:03 ` [PATCH v6 4/8] hwmon: (ina3221) Support alert configuration Wenliang Yan
2026-02-25  9:03 ` [PATCH v6 5/8] hwmon: (ina3221) Introduce power attribute and alert characteristics Wenliang Yan
2026-02-25  9:03 ` [PATCH v6 6/8] hwmon: (ina3221) Modify the 'ina3221_read_value' function Wenliang Yan
2026-02-25 16:10   ` kernel test robot [this message]
2026-02-25  9:03 ` [PATCH v6 7/8] hwmon: (ina3221) Support alert_limit_write function and write/read functions for 'power' attribute Wenliang Yan
2026-02-25  9:03 ` [PATCH v6 8/8] hwmon: (ina3221) Modify write/read functions for 'in' and 'curr' attribute Wenliang Yan

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=202602260043.Og6ibhl8-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=conor+dt@kernel.org \
    --cc=corbet@lwn.net \
    --cc=jdelvare@suse.com \
    --cc=krzk@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 \
    --cc=wenliang202407@163.com \
    /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®