public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* [intel-tdx:guest-tpm 5/6] drivers/char/tpm/tpm_tdx.c:884:32: warning: unused variable 'tdx_guest_ids'
@ 2023-11-20  0:06 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-11-20  0:06 UTC (permalink / raw)
  To: Kuppuswamy Sathyanarayanan; +Cc: llvm, oe-kbuild-all

tree:   https://github.com/intel/tdx.git guest-tpm
head:   8fc95ae74b62b245179fb0a0a84dc5f5d8ce80aa
commit: db9652ec7a5bff8428a39af5c4aa706f62550ee2 [5/6] tpm: Add vTPM TDX support
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20231120/202311200755.tLSSoVwn-lkp@intel.com/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231120/202311200755.tLSSoVwn-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/202311200755.tLSSoVwn-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from drivers/char/tpm/tpm_tdx.c:26:
   In file included from drivers/char/tpm/tpm.h:28:
   include/linux/tpm_eventlog.h:167:6: warning: variable 'mapping_size' set but not used [-Wunused-but-set-variable]
           int mapping_size;
               ^
   drivers/char/tpm/tpm_tdx.c:685:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
           if (spdm->trans_ver != TDX_SESS_SPDM_TRANS_VER ||
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/char/tpm/tpm_tdx.c:716:9: note: uninitialized use occurs here
           return ret;
                  ^~~
   drivers/char/tpm/tpm_tdx.c:685:2: note: remove the 'if' if its condition is always false
           if (spdm->trans_ver != TDX_SESS_SPDM_TRANS_VER ||
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/char/tpm/tpm_tdx.c:685:6: warning: variable 'ret' is used uninitialized whenever '||' condition is true [-Wsometimes-uninitialized]
           if (spdm->trans_ver != TDX_SESS_SPDM_TRANS_VER ||
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/char/tpm/tpm_tdx.c:716:9: note: uninitialized use occurs here
           return ret;
                  ^~~
   drivers/char/tpm/tpm_tdx.c:685:6: note: remove the '||' if its condition is always false
           if (spdm->trans_ver != TDX_SESS_SPDM_TRANS_VER ||
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/char/tpm/tpm_tdx.c:658:9: note: initialize the variable 'ret' to silence this warning
           int ret;
                  ^
                   = 0
>> drivers/char/tpm/tpm_tdx.c:884:32: warning: unused variable 'tdx_guest_ids' [-Wunused-const-variable]
   static const struct x86_cpu_id tdx_guest_ids[] = {
                                  ^
   4 warnings generated.


vim +/tdx_guest_ids +884 drivers/char/tpm/tpm_tdx.c

   883	
 > 884	static const struct x86_cpu_id tdx_guest_ids[] = {
   885		X86_MATCH_FEATURE(X86_FEATURE_TDX_GUEST, NULL),
   886		{}
   887	};
   888	MODULE_DEVICE_TABLE(x86cpu, tdx_guest_ids);
   889	

-- 
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:[~2023-11-20  0:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-20  0:06 [intel-tdx:guest-tpm 5/6] drivers/char/tpm/tpm_tdx.c:884:32: warning: unused variable 'tdx_guest_ids' 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