From: kernel test robot <lkp@intel.com>
To: Swapnil Sapkal <swapnil.sapkal@amd.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH] amd-pstate-ut: Reset amd-pstate driver mode after running selftests
Date: Wed, 7 May 2025 22:56:36 +0800 [thread overview]
Message-ID: <202505072226.g2QclhaR-lkp@intel.com> (raw)
In-Reply-To: <20250430064206.7402-1-swapnil.sapkal@amd.com>
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
parent reply other threads:[~2025-05-07 14:56 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20250430064206.7402-1-swapnil.sapkal@amd.com>]
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=202505072226.g2QclhaR-lkp@intel.com \
--to=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=swapnil.sapkal@amd.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