From: Dan Carpenter <error27@gmail.com>
To: oe-kbuild@lists.linux.dev, Riana Tauro <riana.tauro@intel.com>
Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev,
linux-kernel@vger.kernel.org,
Anshuman Gupta <anshuman.gupta@intel.com>,
Badal Nilawar <badal.nilawar@intel.com>,
Ashutosh Dixit <ashutosh.dixit@intel.com>
Subject: drivers/gpu/drm/i915/i915_hwmon.c:69 hwm_in_read() error: uninitialized symbol 'reg_value'.
Date: Thu, 16 Feb 2023 13:54:36 +0300 [thread overview]
Message-ID: <202302161256.eeoRFhSo-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 033c40a89f55525139fd5b6342281b09b97d05bf
commit: f8572bb675250ee527d9ba35fa1ce17480407399 drm/i915/hwmon: Add HWMON current voltage support
config: x86_64-randconfig-m001-20230213 (https://download.01.org/0day-ci/archive/20230216/202302161256.eeoRFhSo-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Link: https://lore.kernel.org/r/202302161256.eeoRFhSo-lkp@intel.com/
smatch warnings:
drivers/gpu/drm/i915/i915_hwmon.c:69 hwm_in_read() error: uninitialized symbol 'reg_value'.
vim +/reg_value +69 drivers/gpu/drm/i915/i915_hwmon.c
f8572bb675250e Riana Tauro 2022-10-13 57 static int
f8572bb675250e Riana Tauro 2022-10-13 58 hwm_in_read(struct hwm_drvdata *ddat, u32 attr, long *val)
f8572bb675250e Riana Tauro 2022-10-13 59 {
f8572bb675250e Riana Tauro 2022-10-13 60 struct i915_hwmon *hwmon = ddat->hwmon;
f8572bb675250e Riana Tauro 2022-10-13 61 intel_wakeref_t wakeref;
f8572bb675250e Riana Tauro 2022-10-13 62 u32 reg_value;
f8572bb675250e Riana Tauro 2022-10-13 63
f8572bb675250e Riana Tauro 2022-10-13 64 switch (attr) {
f8572bb675250e Riana Tauro 2022-10-13 65 case hwmon_in_input:
f8572bb675250e Riana Tauro 2022-10-13 66 with_intel_runtime_pm(ddat->uncore->rpm, wakeref)
f8572bb675250e Riana Tauro 2022-10-13 67 reg_value = intel_uncore_read(ddat->uncore, hwmon->rg.gt_perf_status);
The with_intel_runtime_pm() macro is a complicated if statement, but
written as a for loop so it can do a get() and a put()? reg_value is
not initialized in the without pm case.
f8572bb675250e Riana Tauro 2022-10-13 68 /* HW register value in units of 2.5 millivolt */
f8572bb675250e Riana Tauro 2022-10-13 @69 *val = DIV_ROUND_CLOSEST(REG_FIELD_GET(GEN12_VOLTAGE_MASK, reg_value) * 25, 10);
f8572bb675250e Riana Tauro 2022-10-13 70 return 0;
f8572bb675250e Riana Tauro 2022-10-13 71 default:
f8572bb675250e Riana Tauro 2022-10-13 72 return -EOPNOTSUPP;
f8572bb675250e Riana Tauro 2022-10-13 73 }
f8572bb675250e Riana Tauro 2022-10-13 74 }
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
reply other threads:[~2023-02-16 10:55 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=202302161256.eeoRFhSo-lkp@intel.com \
--to=error27@gmail.com \
--cc=anshuman.gupta@intel.com \
--cc=ashutosh.dixit@intel.com \
--cc=badal.nilawar@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oe-kbuild@lists.linux.dev \
--cc=riana.tauro@intel.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
all inboxes | Powered by JetHome®