public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Sean Christopherson <sean.j.christopherson@intel.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Isaku Yamahata <isaku.yamahata@intel.com>,
	Xiaoyao Li <xiaoyao.li@intel.com>,
	Kai Huang <kai.huang@linux.intel.com>,
	Chao Gao <chao.gao@intel.com>, Yuan Yao <yuan.yao@intel.com>
Subject: [intel-tdx:kvm 106/181] arch/x86/kvm/vmx/tdx.c:263:6: warning: variable 'cpu' set but not used
Date: Wed, 1 Sep 2021 03:21:31 +0800	[thread overview]
Message-ID: <202109010327.6IJbARIR-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2444 bytes --]

tree:   https://github.com/intel/tdx.git kvm
head:   0c7944582999466d6d979000c4c11a62b78f5472
commit: aca8529f73f7b5fcdb11d4d49e47a8adcd51f2eb [106/181] KVM: TDX: Add "basic" support for building and running Trust Domains
config: x86_64-buildonly-randconfig-r001-20210831 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/intel/tdx/commit/aca8529f73f7b5fcdb11d4d49e47a8adcd51f2eb
        git remote add intel-tdx https://github.com/intel/tdx.git
        git fetch --no-tags intel-tdx kvm
        git checkout aca8529f73f7b5fcdb11d4d49e47a8adcd51f2eb
        # save the attached .config to linux build tree
        make W=1 ARCH=x86_64 

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 >>):

   In file included from arch/x86/kvm/vmx/main.c:16:
   arch/x86/kvm/vmx/tdx.c:27:5: warning: no previous prototype for 'tdx_keyid_alloc' [-Wmissing-prototypes]
      27 | int tdx_keyid_alloc(void)
         |     ^~~~~~~~~~~~~~~
   arch/x86/kvm/vmx/tdx.c:41:6: warning: no previous prototype for 'tdx_keyid_free' [-Wmissing-prototypes]
      41 | void tdx_keyid_free(int keyid)
         |      ^~~~~~~~~~~~~~
   arch/x86/kvm/vmx/tdx.c: In function 'tdx_do_tdh_phymem_cache_wb':
>> arch/x86/kvm/vmx/tdx.c:263:6: warning: variable 'cpu' set but not used [-Wunused-but-set-variable]
     263 |  int cpu, cur_pkg;
         |      ^~~
   arch/x86/kvm/vmx/tdx.c: In function 'tdx_do_tdh_mng_key_config':
   arch/x86/kvm/vmx/tdx.c:343:6: warning: variable 'cpu' set but not used [-Wunused-but-set-variable]
     343 |  int cpu, cur_pkg;
         |      ^~~


vim +/cpu +263 arch/x86/kvm/vmx/tdx.c

   260	
   261	static int tdx_do_tdh_phymem_cache_wb(void *param)
   262	{
 > 263		int cpu, cur_pkg;
   264		u64 err = 0;
   265	
   266		cpu = raw_smp_processor_id();
   267		cur_pkg = topology_physical_package_id(cpu);
   268	
   269		mutex_lock(&tdx_phymem_cache_wb_lock[cur_pkg]);
   270		do {
   271			err = tdh_phymem_cache_wb(!!err);
   272		} while (err == TDX_INTERRUPTED_RESUMABLE);
   273		mutex_unlock(&tdx_phymem_cache_wb_lock[cur_pkg]);
   274	
   275		if (TDX_ERR(err, TDH_PHYMEM_CACHE_WB, NULL))
   276			return -EIO;
   277	
   278		return 0;
   279	}
   280	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 37935 bytes --]

                 reply	other threads:[~2021-08-31 19:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202109010327.6IJbARIR-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=chao.gao@intel.com \
    --cc=isaku.yamahata@intel.com \
    --cc=kai.huang@linux.intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sean.j.christopherson@intel.com \
    --cc=xiaoyao.li@intel.com \
    --cc=yuan.yao@intel.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