Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* Re: [PATCH] amd-pstate-ut: Reset amd-pstate driver mode after running selftests
       [not found] <20250430064206.7402-1-swapnil.sapkal@amd.com>
@ 2025-05-07 14:56 ` kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-05-07 14:56 UTC (permalink / raw)
  To: Swapnil Sapkal; +Cc: llvm, oe-kbuild-all

Hi Swapnil,

kernel test robot noticed the following build warnings:

[auto build test WARNING on rafael-pm/linux-next]
[also build test WARNING on rafael-pm/bleeding-edge linus/master v6.15-rc5 next-20250507]
[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/Swapnil-Sapkal/amd-pstate-ut-Reset-amd-pstate-driver-mode-after-running-selftests/20250430-144443
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
patch link:    https://lore.kernel.org/r/20250430064206.7402-1-swapnil.sapkal%40amd.com
patch subject: [PATCH] amd-pstate-ut: Reset amd-pstate driver mode after running selftests
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20250507/202505072226.g2QclhaR-lkp@intel.com/config)
compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250507/202505072226.g2QclhaR-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/202505072226.g2QclhaR-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/cpufreq/amd-pstate-ut.c:262:6: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]
     262 |         if (ret)
         |             ^~~
   drivers/cpufreq/amd-pstate-ut.c:246:9: note: initialize the variable 'ret' to silence this warning
     246 |         int ret;
         |                ^
         |                 = 0
   1 warning generated.


vim +/ret +262 drivers/cpufreq/amd-pstate-ut.c

   241	
   242	static int amd_pstate_ut_check_driver(u32 index)
   243	{
   244		enum amd_pstate_mode mode1, mode2 = AMD_PSTATE_DISABLE;
   245		enum amd_pstate_mode orig_mode = amd_pstate_get_status();
   246		int ret;
   247	
   248		for (mode1 = AMD_PSTATE_DISABLE; mode1 < AMD_PSTATE_MAX; mode1++) {
   249			int ret = amd_pstate_set_mode(mode1);
   250			if (ret)
   251				return ret;
   252			for (mode2 = AMD_PSTATE_DISABLE; mode2 < AMD_PSTATE_MAX; mode2++) {
   253				if (mode1 == mode2)
   254					continue;
   255				ret = amd_pstate_set_mode(mode2);
   256				if (ret)
   257					goto out;
   258			}
   259		}
   260	
   261	out:
 > 262		if (ret)
   263			pr_warn("%s: failed to update status for %s->%s: %d\n", __func__,
   264				amd_pstate_get_mode_string(mode1),
   265				amd_pstate_get_mode_string(mode2), ret);
   266	
   267		amd_pstate_set_mode(orig_mode);
   268		return ret;
   269	}
   270	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-05-07 14:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20250430064206.7402-1-swapnil.sapkal@amd.com>
2025-05-07 14:56 ` [PATCH] amd-pstate-ut: Reset amd-pstate driver mode after running selftests kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox