From: kernel test robot <lkp@intel.com>
To: Wenliang Yan <wenliang202407@163.com>,
linux@roeck-us.net, Jean Delvare <jdelvare@suse.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
christophe.jaillet@wanadoo.fr, conor+dt@kernel.org,
corbet@lwn.net, devicetree@vger.kernel.org, krzk+dt@kernel.org,
linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org,
robh@kernel.org, wenliang202407@163.com
Subject: Re: [PATCH 6/8] hwmon:(ina3221)Modify read/write functions for 'in' attribute
Date: Wed, 12 Nov 2025 11:58:31 +0800 [thread overview]
Message-ID: <202511121034.856ivnlW-lkp@intel.com> (raw)
In-Reply-To: <20251111080546.32421-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 linus/master v6.18-rc5 next-20251111]
[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-binding-ti-ina3221-Add-SQ52210/20251111-161425
base: https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next
patch link: https://lore.kernel.org/r/20251111080546.32421-7-wenliang202407%40163.com
patch subject: [PATCH 6/8] hwmon:(ina3221)Modify read/write functions for 'in' attribute
config: i386-randconfig-013-20251112 (https://download.01.org/0day-ci/archive/20251112/202511121034.856ivnlW-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251112/202511121034.856ivnlW-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/202511121034.856ivnlW-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/hwmon/ina3221.c:563:21: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides]
563 | [hwmon_in_lcrit] = { BIT(9), BIT(8), BIT(7) },
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hwmon/ina3221.c:561:23: note: previous initialization is here
561 | [hwmon_curr_lcrit] = { BIT(15), BIT(14), BIT(13) },
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/hwmon/ina3221.c:589:2: warning: variable 'alert_group' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized]
589 | default:
| ^~~~~~~
drivers/hwmon/ina3221.c:598:5: note: uninitialized use occurs here
598 | alert_group, 0);
| ^~~~~~~~~~~
drivers/hwmon/ina3221.c:571:17: note: initialize the variable 'alert_group' to silence this warning
571 | u32 alert_group;
| ^
| = 0
2 warnings generated.
vim +/alert_group +589 drivers/hwmon/ina3221.c
559
560 static const u32 sq52210_alert_mask[][INA3221_NUM_CHANNELS] = {
561 [hwmon_curr_lcrit] = { BIT(15), BIT(14), BIT(13) },
562 [hwmon_in_crit] = { BIT(12), BIT(11), BIT(10) },
> 563 [hwmon_in_lcrit] = { BIT(9), BIT(8), BIT(7) },
564 [hwmon_power_crit] = { BIT(6), BIT(5), BIT(4) },
565 };
566
567 static int sq52210_alert_limit_write(struct ina3221_data *ina, u32 attr, int channel, long val)
568 {
569 struct regmap *regmap = ina->regmap;
570 int ret, limit_reg, item;
571 u32 alert_group;
572
573 if (val < 0)
574 return -EINVAL;
575 item = channel % INA3221_NUM_CHANNELS;
576 switch (item) {
577 case 0:
578 alert_group = SQ52210_MASK_ALERT_CHANNEL1;
579 limit_reg = SQ52210_ALERT_LIMIT1;
580 break;
581 case 1:
582 alert_group = SQ52210_MASK_ALERT_CHANNEL2;
583 limit_reg = SQ52210_ALERT_LIMIT2;
584 break;
585 case 2:
586 alert_group = SQ52210_MASK_ALERT_CHANNEL3;
587 limit_reg = SQ52210_ALERT_LIMIT3;
588 break;
> 589 default:
590 break;
591 }
592 /*
593 * Clear all alerts first to avoid accidentally triggering ALERT pin
594 * due to register write sequence. Then, only enable the alert
595 * if the value is non-zero.
596 */
597 ret = regmap_update_bits(regmap, SQ52210_ALERT_CONFIG,
598 alert_group, 0);
599 if (ret < 0)
600 return ret;
601 ret = regmap_write(regmap, limit_reg,
602 sq52210_alert_to_reg(ina, ina3221_curr_reg[attr][item], val));
603 if (ret < 0)
604 return ret;
605
606 if (val)
607 return regmap_update_bits(regmap, SQ52210_ALERT_CONFIG,
608 alert_group, sq52210_alert_mask[attr][item]);
609 return 0;
610 }
611
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-11-12 3:59 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-11 8:05 [PATCH 0/8] (hwmon):(ina3221) Various improvement and add support for SQ52210 Wenliang Yan
2025-11-11 8:05 ` [PATCH 1/8] dt-binding:ti,ina3221:Add SQ52210 Wenliang Yan
2025-11-11 8:17 ` Krzysztof Kozlowski
2025-11-12 2:09 ` Wenliang Yan
2025-11-11 9:32 ` Rob Herring (Arm)
2025-11-12 2:08 ` Wenliang Yan
2025-11-13 2:03 ` Guenter Roeck
2025-11-14 6:44 ` Wenliang Yan
2025-11-11 8:05 ` [PATCH 2/8] hwmon:(ina3221)Add support for SQ52210 Wenliang Yan
2025-11-11 8:05 ` [PATCH 3/8] hwmon:(ina3221)Support alert-type Wenliang Yan
2025-11-11 8:05 ` [PATCH 4/8] hwmon:(ina3221)Pre-calculate current and power LSB Wenliang Yan
2025-11-11 8:05 ` [PATCH 5/8] hwmon:(ina3221)Introduce power attribute and other characteristics of other attribute Wenliang Yan
2025-11-11 8:05 ` [PATCH 6/8] hwmon:(ina3221)Modify read/write functions for 'in' attribute Wenliang Yan
2025-11-12 3:58 ` kernel test robot [this message]
2025-11-13 17:16 ` Guenter Roeck
2025-11-14 7:36 ` [PATCH 1/8] dt-binding:ti,ina3221:Add SQ52210 Wenliang Yan
2025-11-11 8:05 ` [PATCH 7/8] hwmon:(ina3221)Support read/write functions for 'power' attribute Wenliang Yan
2025-11-13 17:18 ` Guenter Roeck
2025-11-14 7:41 ` [PATCH 1/8] dt-binding:ti,ina3221:Add SQ52210 Wenliang Yan
2025-11-11 8:05 ` [PATCH 8/8] hwmon:(ina3221)Support read/write functions for current_lcrict 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=202511121034.856ivnlW-lkp@intel.com \
--to=lkp@intel.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=conor+dt@kernel.org \
--cc=corbet@lwn.net \
--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=llvm@lists.linux.dev \
--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;
as well as URLs for NNTP newsgroup(s).