[Intel-gfx] [PATCH v2] drm/i915/gt: Add sysfs RAPL PL1 interface
kernel test robot
lkp at intel.com
Tue Jan 31 09:21:15 UTC 2023
Hi Sujaritha,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on drm-tip/drm-tip]
url: https://github.com/intel-lab-lkp/linux/commits/Sujaritha-Sundaresan/drm-i915-gt-Add-sysfs-RAPL-PL1-interface/20230131-152446
base: git://anongit.freedesktop.org/drm/drm-tip drm-tip
patch link: https://lore.kernel.org/r/20230131062550.11901-1-sujaritha.sundaresan%40intel.com
patch subject: [Intel-gfx] [PATCH v2] drm/i915/gt: Add sysfs RAPL PL1 interface
config: x86_64-rhel-8.3-rust (https://download.01.org/0day-ci/archive/20230131/202301311720.VOyrcus2-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/562c57549ee00ea298f9023380d44526d6d68921
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Sujaritha-Sundaresan/drm-i915-gt-Add-sysfs-RAPL-PL1-interface/20230131-152446
git checkout 562c57549ee00ea298f9023380d44526d6d68921
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp at intel.com>
All warnings (new ones prefixed by >>):
>> drivers/gpu/drm/i915/gt/intel_rps.c:2217:6: warning: variable 'rapl' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (IS_METEORLAKE(i915) || IS_XEHPSDV(i915))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/i915_drv.h:565:33: note: expanded from macro 'IS_METEORLAKE'
#define IS_METEORLAKE(dev_priv) IS_PLATFORM(dev_priv, INTEL_METEORLAKE)
^
drivers/gpu/drm/i915/gt/intel_rps.c:2220:9: note: uninitialized use occurs here
return rapl;
^~~~
drivers/gpu/drm/i915/gt/intel_rps.c:2217:2: note: remove the 'if' if its condition is always true
if (IS_METEORLAKE(i915) || IS_XEHPSDV(i915))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/gt/intel_rps.c:2209:10: note: initialize the variable 'rapl' to silence this warning
u32 rapl;
^
= 0
1 warning generated.
vim +2217 drivers/gpu/drm/i915/gt/intel_rps.c
2204
2205 u32 intel_rps_read_rapl_pl1(struct intel_rps *rps)
2206 {
2207 struct drm_i915_private *i915 = rps_to_i915(rps);
2208 u32 rapl_pl1;
2209 u32 rapl;
2210
2211 if (IS_METEORLAKE(i915))
2212 rapl_pl1 = intel_uncore_read(rps_to_gt(rps)->uncore, MTL_RAPL_PL1_FREQ_LIMIT);
2213 else if (IS_XEHPSDV(i915))
2214 rapl_pl1 = intel_uncore_read(rps_to_gt(rps)->uncore, XEHPSDV_RAPL_PL1_FREQ_LIMIT);
2215
2216
> 2217 if (IS_METEORLAKE(i915) || IS_XEHPSDV(i915))
2218 rapl = REG_FIELD_GET(RAPL_PL1_FREQ_LIMIT_MASK, rapl_pl1);
2219
2220 return rapl;
2221 }
2222
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
More information about the Intel-gfx
mailing list