public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jishnu Prakash <jishnu.prakash@oss.qualcomm.com>,
	jic23@kernel.org, robh@kernel.org, krzk+dt@kernel.org,
	conor+dt@kernel.org, agross@kernel.org, andersson@kernel.org,
	lumag@kernel.org, dmitry.baryshkov@oss.qualcomm.com,
	konradybcio@kernel.org, daniel.lezcano@linaro.org,
	sboyd@kernel.org, amitk@kernel.org, thara.gopinath@gmail.com,
	lee@kernel.org, rafael@kernel.org,
	subbaraman.narayanamurthy@oss.qualcomm.com,
	david.collins@oss.qualcomm.com,
	anjelique.melendez@oss.qualcomm.com,
	kamal.wadhwa@oss.qualcomm.com
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	rui.zhang@intel.com, lukasz.luba@arm.com,
	devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-pm@vger.kernel.org, cros-qcom-dts-watchers@chromium.org,
	jishnu.prakash@oss.qualcomm.com, quic_kotarake@quicinc.com,
	neil.armstrong@linaro.org
Subject: Re: [PATCH V9 4/4] thermal: qcom: add support for PMIC5 Gen3 ADC thermal monitoring
Date: Thu, 29 Jan 2026 04:51:33 +0800	[thread overview]
Message-ID: <202601290438.IXYMj3d2-lkp@intel.com> (raw)
In-Reply-To: <20260128112420.695518-5-jishnu.prakash@oss.qualcomm.com>

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

      reply	other threads:[~2026-01-28 20:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-28 11:24 [PATCH V9 0/4] Add support for QCOM SPMI PMIC5 Gen3 ADC Jishnu Prakash
2026-01-28 11:24 ` [PATCH V9 1/4] dt-bindings: iio: adc: Split out QCOM VADC channel properties Jishnu Prakash
2026-01-28 11:24 ` [PATCH V9 2/4] dt-bindings: iio: adc: Add support for QCOM PMIC5 Gen3 ADC Jishnu Prakash
2026-01-28 11:24 ` [PATCH V9 3/4] " Jishnu Prakash
2026-01-28 11:24 ` [PATCH V9 4/4] thermal: qcom: add support for PMIC5 Gen3 ADC thermal monitoring Jishnu Prakash
2026-01-28 20:51   ` 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=202601290438.IXYMj3d2-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=agross@kernel.org \
    --cc=amitk@kernel.org \
    --cc=andersson@kernel.org \
    --cc=anjelique.melendez@oss.qualcomm.com \
    --cc=conor+dt@kernel.org \
    --cc=cros-qcom-dts-watchers@chromium.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=david.collins@oss.qualcomm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=jic23@kernel.org \
    --cc=jishnu.prakash@oss.qualcomm.com \
    --cc=kamal.wadhwa@oss.qualcomm.com \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=lukasz.luba@arm.com \
    --cc=lumag@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=quic_kotarake@quicinc.com \
    --cc=rafael@kernel.org \
    --cc=robh@kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=sboyd@kernel.org \
    --cc=subbaraman.narayanamurthy@oss.qualcomm.com \
    --cc=thara.gopinath@gmail.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