From: kernel test robot <lkp@intel.com>
To: "Delphine CC Chiu" <Delphine_CC_Chiu@wiwynn.com>,
patrick@stwcx.xyz, "Carsten Spieß" <mail@carsten-spiess.de>,
"Jean Delvare" <jdelvare@suse.com>,
"Guenter Roeck" <linux@roeck-us.net>
Cc: oe-kbuild-all@lists.linux.dev,
Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Jonathan Corbet <corbet@lwn.net>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Magnus Damm <magnus.damm@gmail.com>,
linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH v6 3/3] hwmon: (isl28022) support shunt voltage for ISL28022 power monitor
Date: Tue, 10 Sep 2024 13:12:28 +0800 [thread overview]
Message-ID: <202409101229.6mTYs5Rf-lkp@intel.com> (raw)
In-Reply-To: <20240906061421.9392-4-Delphine_CC_Chiu@wiwynn.com>
Hi Delphine,
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.11-rc7 next-20240909]
[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/Delphine-CC-Chiu/hwmon-isl28022-new-driver-for-ISL28022-power-monitor/20240906-141717
base: https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next
patch link: https://lore.kernel.org/r/20240906061421.9392-4-Delphine_CC_Chiu%40wiwynn.com
patch subject: [PATCH v6 3/3] hwmon: (isl28022) support shunt voltage for ISL28022 power monitor
config: microblaze-randconfig-r073-20240909 (https://download.01.org/0day-ci/archive/20240910/202409101229.6mTYs5Rf-lkp@intel.com/config)
compiler: microblaze-linux-gcc (GCC) 14.1.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/202409101229.6mTYs5Rf-lkp@intel.com/
smatch warnings:
drivers/hwmon/isl28022.c:122 isl28022_read() warn: inconsistent indenting
vim +122 drivers/hwmon/isl28022.c
89
90 static int isl28022_read(struct device *dev, enum hwmon_sensor_types type,
91 u32 attr, int channel, long *val)
92 {
93 struct isl28022_data *data = dev_get_drvdata(dev);
94 unsigned int regval;
95 int err;
96 u16 sign_bit;
97
98 switch (type) {
99 case hwmon_in:
100 switch (channel) {
101 case 0:
102 switch (attr) {
103 case hwmon_in_input:
104 err = regmap_read(data->regmap,
105 ISL28022_REG_BUS, ®val);
106 if (err < 0)
107 return err;
108 /* driver supports only 60V mode (BRNG 11) */
109 *val = (long)(((u16)regval) & 0xFFFC);
110 break;
111 default:
112 return -EOPNOTSUPP;
113 }
114 break;
115 case 1:
116 switch (attr) {
117 case hwmon_in_input:
118 err = regmap_read(data->regmap,
119 ISL28022_REG_SHUNT, ®val);
120 if (err < 0)
121 return err;
> 122 switch (data->gain) {
123 case 8:
124 sign_bit = (regval >> 15) & 0x01;
125 *val = (long)((((u16)regval) & 0x7FFF) -
126 (sign_bit * 32768)) / 100;
127 break;
128 case 4:
129 sign_bit = (regval >> 14) & 0x01;
130 *val = (long)((((u16)regval) & 0x3FFF) -
131 (sign_bit * 16384)) / 100;
132 break;
133 case 2:
134 sign_bit = (regval >> 13) & 0x01;
135 *val = (long)((((u16)regval) & 0x1FFF) -
136 (sign_bit * 8192)) / 100;
137 break;
138 case 1:
139 sign_bit = (regval >> 12) & 0x01;
140 *val = (long)((((u16)regval) & 0x0FFF) -
141 (sign_bit * 4096)) / 100;
142 break;
143 }
144 break;
145 default:
146 return -EOPNOTSUPP;
147 }
148 break;
149 default:
150 return -EOPNOTSUPP;
151 }
152 break;
153 case hwmon_curr:
154 switch (attr) {
155 case hwmon_curr_input:
156 err = regmap_read(data->regmap,
157 ISL28022_REG_CURRENT, ®val);
158 if (err < 0)
159 return err;
160 *val = ((long)regval * 1250L * (long)data->gain) /
161 (long)data->shunt;
162 break;
163 default:
164 return -EOPNOTSUPP;
165 }
166 break;
167 case hwmon_power:
168 switch (attr) {
169 case hwmon_power_input:
170 err = regmap_read(data->regmap,
171 ISL28022_REG_POWER, ®val);
172 if (err < 0)
173 return err;
174 *val = ((51200000L * ((long)data->gain)) /
175 (long)data->shunt) * (long)regval;
176 break;
177 default:
178 return -EOPNOTSUPP;
179 }
180 break;
181 default:
182 return -EOPNOTSUPP;
183 }
184
185 return 0;
186 }
187
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
prev parent reply other threads:[~2024-09-10 5:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-06 6:14 [PATCH v6 0/3] hwmon: (isl28022) new driver for ISL28022 power monitor Delphine CC Chiu
2024-09-06 6:14 ` [PATCH v6 1/3] " Delphine CC Chiu
2024-09-06 6:35 ` Biju Das
2024-09-06 18:58 ` kernel test robot
2024-09-06 6:14 ` [PATCH v6 2/3] dt-bindings: hwmon: add renesas,isl28022 Delphine CC Chiu
2024-09-06 6:28 ` Biju Das
2024-09-06 7:29 ` Krzysztof Kozlowski
2024-09-06 6:14 ` [PATCH v6 3/3] hwmon: (isl28022) support shunt voltage for ISL28022 power monitor Delphine CC Chiu
2024-09-06 7:31 ` Krzysztof Kozlowski
2024-09-06 11:57 ` Guenter Roeck
2024-09-10 5:12 ` kernel test robot [this message]
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=202409101229.6mTYs5Rf-lkp@intel.com \
--to=lkp@intel.com \
--cc=Delphine_CC_Chiu@wiwynn.com \
--cc=conor+dt@kernel.org \
--cc=corbet@lwn.net \
--cc=devicetree@vger.kernel.org \
--cc=geert+renesas@glider.be \
--cc=jdelvare@suse.com \
--cc=krzk@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=magnus.damm@gmail.com \
--cc=mail@carsten-spiess.de \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=patrick@stwcx.xyz \
--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