BCC: lkp(a)intel.com CC: kbuild-all(a)lists.01.org In-Reply-To: <20221013154526.2105579-4-ashutosh.dixit@intel.com> References: <20221013154526.2105579-4-ashutosh.dixit@intel.com> TO: Ashutosh Dixit Hi Ashutosh, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on drm-intel/for-linux-next] [also build test WARNING on groeck-staging/hwmon-next linus/master v6.1-rc1 next-20221019] [cannot apply to drm-tip/drm-tip] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Ashutosh-Dixit/drm-i915-Add-HWMON-support/20221013-234912 base: git://anongit.freedesktop.org/drm-intel for-linux-next patch link: https://lore.kernel.org/r/20221013154526.2105579-4-ashutosh.dixit%40intel.com patch subject: [PATCH 3/7] drm/i915/hwmon: Power PL1 limit and TDP setting :::::: branch date: 6 days ago :::::: commit date: 6 days ago config: x86_64-randconfig-m001-20221017 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 | Reported-by: Dan Carpenter New smatch warnings: drivers/gpu/drm/i915/i915_hwmon.c:77 hwm_field_read_and_scale() error: uninitialized symbol 'reg_value'. Old smatch warnings: drivers/gpu/drm/i915/i915_hwmon.c:132 hwm_in_read() error: uninitialized symbol 'reg_value'. vim +/reg_value +77 drivers/gpu/drm/i915/i915_hwmon.c 8a9e6f27c4e241 Dale B Stimson 2022-10-13 60 8a9e6f27c4e241 Dale B Stimson 2022-10-13 61 /* 8a9e6f27c4e241 Dale B Stimson 2022-10-13 62 * This function's return type of u64 allows for the case where the scaling 8a9e6f27c4e241 Dale B Stimson 2022-10-13 63 * of the field taken from the 32-bit register value might cause a result to 8a9e6f27c4e241 Dale B Stimson 2022-10-13 64 * exceed 32 bits. 8a9e6f27c4e241 Dale B Stimson 2022-10-13 65 */ 8a9e6f27c4e241 Dale B Stimson 2022-10-13 66 static u64 8a9e6f27c4e241 Dale B Stimson 2022-10-13 67 hwm_field_read_and_scale(struct hwm_drvdata *ddat, i915_reg_t rgadr, 8a9e6f27c4e241 Dale B Stimson 2022-10-13 68 u32 field_msk, int nshift, u32 scale_factor) 8a9e6f27c4e241 Dale B Stimson 2022-10-13 69 { 8a9e6f27c4e241 Dale B Stimson 2022-10-13 70 struct intel_uncore *uncore = ddat->uncore; 8a9e6f27c4e241 Dale B Stimson 2022-10-13 71 intel_wakeref_t wakeref; 8a9e6f27c4e241 Dale B Stimson 2022-10-13 72 u32 reg_value; 8a9e6f27c4e241 Dale B Stimson 2022-10-13 73 8a9e6f27c4e241 Dale B Stimson 2022-10-13 74 with_intel_runtime_pm(uncore->rpm, wakeref) 8a9e6f27c4e241 Dale B Stimson 2022-10-13 75 reg_value = intel_uncore_read(uncore, rgadr); 8a9e6f27c4e241 Dale B Stimson 2022-10-13 76 8a9e6f27c4e241 Dale B Stimson 2022-10-13 @77 reg_value = REG_FIELD_GET(field_msk, reg_value); 8a9e6f27c4e241 Dale B Stimson 2022-10-13 78 8a9e6f27c4e241 Dale B Stimson 2022-10-13 79 return mul_u64_u32_shr(reg_value, scale_factor, nshift); 8a9e6f27c4e241 Dale B Stimson 2022-10-13 80 } 8a9e6f27c4e241 Dale B Stimson 2022-10-13 81 -- 0-DAY CI Kernel Test Service https://01.org/lkp