From: kernel test robot <lkp@intel.com>
To: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-acpi@vger.kernel.org,
linux-pm@vger.kernel.org, "Rafael J. Wysocki" <rjw@rjwysocki.net>
Subject: [rafael-pm:bleeding-edge 56/59] drivers/thermal/intel/therm_throt.c:545:17: warning: 'msr_val' is used uninitialized
Date: Sat, 11 Jul 2026 11:49:09 +0800 [thread overview]
Message-ID: <202607111159.OKnM0OJu-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git bleeding-edge
head: 29ef85e24c475132363ab956dea5db1b2600ef75
commit: 9d8ba97052b6d613819ae217cc406228a5799df1 [56/59] thermal: intel: Enable the Directed Package-level Thermal Interrupt
config: x86_64-buildonly-randconfig-002-20260711 (https://download.01.org/0day-ci/archive/20260711/202607111159.OKnM0OJu-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.4.0-5) 12.4.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260711/202607111159.OKnM0OJu-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/202607111159.OKnM0OJu-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/thermal/intel/therm_throt.c: In function 'check_directed_thermal_pkg_intr_ack':
drivers/thermal/intel/therm_throt.c:545:17: error: implicit declaration of function 'rdmsrl'; did you mean 'rdmsrq'? [-Werror=implicit-function-declaration]
545 | rdmsrl(MSR_IA32_PACKAGE_THERM_STATUS, msr_val);
| ^~~~~~
| rdmsrq
drivers/thermal/intel/therm_throt.c: In function 'config_directed_thermal_pkg_intr':
drivers/thermal/intel/therm_throt.c:570:9: error: implicit declaration of function 'wrmsrl'; did you mean 'wrmsrq'? [-Werror=implicit-function-declaration]
570 | wrmsrl(MSR_IA32_THERM_INTERRUPT, msr_val);
| ^~~~~~
| wrmsrq
drivers/thermal/intel/therm_throt.c: In function 'check_directed_thermal_pkg_intr_ack':
>> drivers/thermal/intel/therm_throt.c:545:17: warning: 'msr_val' is used uninitialized [-Wuninitialized]
545 | rdmsrl(MSR_IA32_PACKAGE_THERM_STATUS, msr_val);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/thermal/intel/therm_throt.c:538:13: note: 'msr_val' was declared here
538 | u64 msr_val;
| ^~~~~~~
drivers/thermal/intel/therm_throt.c: In function 'config_directed_thermal_pkg_intr':
drivers/thermal/intel/therm_throt.c:563:9: warning: 'msr_val' is used uninitialized [-Wuninitialized]
563 | rdmsrl(MSR_IA32_THERM_INTERRUPT, msr_val);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/thermal/intel/therm_throt.c:561:13: note: 'msr_val' was declared here
561 | u64 msr_val;
| ^~~~~~~
cc1: some warnings being treated as errors
vim +/msr_val +545 drivers/thermal/intel/therm_throt.c
534
535 static int check_directed_thermal_pkg_intr_ack(void)
536 {
537 unsigned int count = 15000;
538 u64 msr_val;
539
540 /*
541 * Hardware acknowledges the directed interrupt setup in 10ms or less.
542 * Wait 15ms to be safe.
543 */
544 do {
> 545 rdmsrl(MSR_IA32_PACKAGE_THERM_STATUS, msr_val);
546 udelay(1);
547 } while (!(msr_val & PACKAGE_THERM_STATUS_DPTI_ACK) && --count);
548
549 if (!count)
550 return -ETIMEDOUT;
551
552 thermal_clear_package_intr_status(PACKAGE_LEVEL,
553 PACKAGE_THERM_STATUS_DPTI_ACK);
554
555 return 0;
556 }
557
558 static void config_directed_thermal_pkg_intr(void *info)
559 {
560 bool enable = *((bool *)info);
561 u64 msr_val;
562
563 rdmsrl(MSR_IA32_THERM_INTERRUPT, msr_val);
564
565 if (enable)
566 msr_val |= THERM_INT_DPTI_ENABLE;
567 else
568 msr_val &= ~THERM_INT_DPTI_ENABLE;
569
> 570 wrmsrl(MSR_IA32_THERM_INTERRUPT, msr_val);
571 }
572
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-07-11 3:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202607111159.OKnM0OJu-lkp@intel.com \
--to=lkp@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=ricardo.neri-calderon@linux.intel.com \
--cc=rjw@rjwysocki.net \
/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