* [intel-tdx:kvm-upstream-workaround 190/293] arch/x86/virt/vmx/tdx/tdx_debug.c:38:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is false
@ 2022-04-22 22:51 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-04-22 22:51 UTC (permalink / raw)
To: Isaku Yamahata; +Cc: llvm, kbuild-all, linux-kernel
tree: https://github.com/intel/tdx.git kvm-upstream-workaround
head: d32e9a403c5c4f16dc577cbe92148e5b80f79d59
commit: eed43994431837da508aed7b50717777818c1837 [190/293] [REVERTME] debugfs to operation on TDX debug op
config: x86_64-allmodconfig (https://download.01.org/0day-ci/archive/20220423/202204230602.MCSINBa4-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 5bd87350a5ae429baf8f373cb226a57b62f87280)
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/tdx/commit/eed43994431837da508aed7b50717777818c1837
git remote add intel-tdx https://github.com/intel/tdx.git
git fetch --no-tags intel-tdx kvm-upstream-workaround
git checkout eed43994431837da508aed7b50717777818c1837
# 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 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> arch/x86/virt/vmx/tdx/tdx_debug.c:38:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (debugconfig_supported) {
^~~~~~~~~~~~~~~~~~~~~
arch/x86/virt/vmx/tdx/tdx_debug.c:46:10: note: uninitialized use occurs here
return ret;
^~~
arch/x86/virt/vmx/tdx/tdx_debug.c:38:2: note: remove the 'if' if its condition is always true
if (debugconfig_supported) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/virt/vmx/tdx/tdx_debug.c:36:9: note: initialize the variable 'ret' to silence this warning
int ret;
^
= 0
1 warning generated.
vim +38 arch/x86/virt/vmx/tdx/tdx_debug.c
32
33 static inline u64 tddebugconfig(u64 subleaf, u64 param1, u64 param2)
34 {
35 static bool debugconfig_supported = true;
36 int ret;
37
> 38 if (debugconfig_supported) {
39 ret = __seamcall(SEAMCALL_TDDEBUGCONFIG, subleaf, param1, param2, 0, NULL);
40 if (ret) {
41 pr_info("DEBUGCONFIG SEAMCALL isn't supported.\n");
42 debugconfig_supported = false;
43 }
44 }
45
46 return ret;
47 }
48
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-04-22 22:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-22 22:51 [intel-tdx:kvm-upstream-workaround 190/293] arch/x86/virt/vmx/tdx/tdx_debug.c:38:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is false kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.