public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* Re: [PATCH V9 4/4] thermal: qcom: add support for PMIC5 Gen3 ADC thermal monitoring
       [not found] <20260128112420.695518-5-jishnu.prakash@oss.qualcomm.com>
@ 2026-01-28 20:51 ` kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-01-28 20:51 UTC (permalink / raw)
  To: Jishnu Prakash, jic23, robh, krzk+dt, conor+dt, agross, andersson,
	lumag, dmitry.baryshkov, konradybcio, daniel.lezcano, sboyd,
	amitk, thara.gopinath, lee, rafael, subbaraman.narayanamurthy,
	david.collins, anjelique.melendez, kamal.wadhwa
  Cc: llvm, oe-kbuild-all, rui.zhang, lukasz.luba, devicetree,
	linux-arm-msm, linux-iio, linux-kernel, linux-pm,
	cros-qcom-dts-watchers, jishnu.prakash, quic_kotarake,
	neil.armstrong

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@intel.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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-01-28 20:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20260128112420.695518-5-jishnu.prakash@oss.qualcomm.com>
2026-01-28 20:51 ` [PATCH V9 4/4] thermal: qcom: add support for PMIC5 Gen3 ADC thermal monitoring kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox