[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202601290438.IXYMj3d2-lkp@intel.com>
Date: Thu, 29 Jan 2026 04:51:33 +0800
From: kernel test robot <lkp@...el.com>
To: Jishnu Prakash <jishnu.prakash@....qualcomm.com>, jic23@...nel.org,
robh@...nel.org, krzk+dt@...nel.org, conor+dt@...nel.org,
agross@...nel.org, andersson@...nel.org, lumag@...nel.org,
dmitry.baryshkov@....qualcomm.com, konradybcio@...nel.org,
daniel.lezcano@...aro.org, sboyd@...nel.org, amitk@...nel.org,
thara.gopinath@...il.com, lee@...nel.org, rafael@...nel.org,
subbaraman.narayanamurthy@....qualcomm.com,
david.collins@....qualcomm.com, anjelique.melendez@....qualcomm.com,
kamal.wadhwa@....qualcomm.com
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
rui.zhang@...el.com, lukasz.luba@....com,
devicetree@...r.kernel.org, linux-arm-msm@...r.kernel.org,
linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-pm@...r.kernel.org, cros-qcom-dts-watchers@...omium.org,
jishnu.prakash@....qualcomm.com, quic_kotarake@...cinc.com,
neil.armstrong@...aro.org
Subject: Re: [PATCH V9 4/4] thermal: qcom: add support for PMIC5 Gen3 ADC
thermal monitoring
Hi Jishnu,
kernel test robot noticed the following build warnings:
[auto build test WARNING on 63804fed149a6750ffd28610c5c1c98cce6bd377]
url: https://github.com/intel-lab-lkp/linux/commits/Jishnu-Prakash/dt-bindings-iio-adc-Split-out-QCOM-VADC-channel-properties/20260128-193116
base: 63804fed149a6750ffd28610c5c1c98cce6bd377
patch link: https://lore.kernel.org/r/20260128112420.695518-5-jishnu.prakash%40oss.qualcomm.com
patch subject: [PATCH V9 4/4] thermal: qcom: add support for PMIC5 Gen3 ADC thermal monitoring
config: hexagon-allmodconfig (https://download.01.org/0day-ci/archive/20260129/202601290438.IXYMj3d2-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260129/202601290438.IXYMj3d2-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/202601290438.IXYMj3d2-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/thermal/qcom/qcom-spmi-adc-tm5-gen3.c:180:9: warning: variable 'upper_set' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
180 | if (ret)
| ^~~
drivers/thermal/qcom/qcom-spmi-adc-tm5-gen3.c:188:9: note: uninitialized use occurs here
188 | if (!(upper_set || lower_set))
| ^~~~~~~~~
drivers/thermal/qcom/qcom-spmi-adc-tm5-gen3.c:180:5: note: remove the 'if' if its condition is always false
180 | if (ret)
| ^~~~~~~~
181 | break;
| ~~~~~
drivers/thermal/qcom/qcom-spmi-adc-tm5-gen3.c:171:17: note: initialize the variable 'upper_set' to silence this warning
171 | bool upper_set, lower_set;
| ^
| = 0
1 warning generated.
vim +180 drivers/thermal/qcom/qcom-spmi-adc-tm5-gen3.c
159
160 static void tm_handler_work(struct work_struct *work)
161 {
162 struct adc_tm5_gen3_chip *adc_tm5 = container_of(work, struct adc_tm5_gen3_chip,
163 tm_handler_work);
164 int sdam_index = -1;
165 u8 tm_status[2] = { };
166 u8 buf[16] = { };
167
168 for (int i = 0; i < adc_tm5->nchannels; i++) {
169 struct adc_tm5_gen3_channel_props *chan_prop = &adc_tm5->chan_props[i];
170 int offset = chan_prop->tm_chan_index;
171 bool upper_set, lower_set;
172 int ret, temp;
173 u16 code;
174
175 scoped_guard(adc5_gen3, adc_tm5) {
176 if (chan_prop->sdam_index != sdam_index) {
177 sdam_index = chan_prop->sdam_index;
178 ret = adc5_gen3_tm_status_check(adc_tm5, sdam_index,
179 tm_status, buf);
> 180 if (ret)
181 break;
182 }
183
184 upper_set = ((tm_status[0] & BIT(offset)) && chan_prop->high_thr_en);
185 lower_set = ((tm_status[1] & BIT(offset)) && chan_prop->low_thr_en);
186 }
187
188 if (!(upper_set || lower_set))
189 continue;
190
191 code = get_unaligned_le16(&buf[2 * offset]);
192 dev_dbg(adc_tm5->dev, "ADC_TM threshold code:%#x\n", code);
193
194 ret = adc5_gen3_therm_code_to_temp(adc_tm5->dev,
195 &chan_prop->common_props,
196 code, &temp);
197 if (ret) {
198 dev_err(adc_tm5->dev,
199 "Invalid temperature reading, ret = %d, code=%#x\n",
200 ret, code);
201 continue;
202 }
203
204 chan_prop->last_temp = temp;
205 chan_prop->last_temp_set = true;
206 thermal_zone_device_update(chan_prop->tzd, THERMAL_TRIP_VIOLATED);
207 }
208 }
209
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists