public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Atish Patra <atishp@rivosinc.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	Atish Patra <Atish.Patra@wdc.com>,
	linux-kernel@vger.kernel.org, Anup Patel <anup@brainfault.org>
Subject: [atishp04:sstc_v6 5/5] arch/riscv/kvm/vcpu_timer.c:302:23: warning: variable 'csr' set but not used
Date: Sat, 23 Jul 2022 19:42:32 +0800	[thread overview]
Message-ID: <202207231936.SWNvXLnK-lkp@intel.com> (raw)

tree:   https://github.com/atishp04/linux sstc_v6
head:   c20c842325eb8261b2a0a034aad746505475fef7
commit: c20c842325eb8261b2a0a034aad746505475fef7 [5/5] RISC-V: KVM: Support sstc extension
config: riscv-randconfig-c006-20220721 (https://download.01.org/0day-ci/archive/20220723/202207231936.SWNvXLnK-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 12fbd2d377e396ad61bce56d71c98a1eb1bebfa9)
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
        # install riscv cross compiling tool for clang build
        # apt-get install binutils-riscv64-linux-gnu
        # https://github.com/atishp04/linux/commit/c20c842325eb8261b2a0a034aad746505475fef7
        git remote add atishp04 https://github.com/atishp04/linux
        git fetch --no-tags atishp04 sstc_v6
        git checkout c20c842325eb8261b2a0a034aad746505475fef7
        # 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=riscv SHELL=/bin/bash arch/riscv/kvm/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> arch/riscv/kvm/vcpu_timer.c:302:23: warning: variable 'csr' set but not used [-Wunused-but-set-variable]
           struct kvm_vcpu_csr *csr;
                                ^
   arch/riscv/kvm/vcpu_timer.c:327:23: warning: variable 'csr' set but not used [-Wunused-but-set-variable]
           struct kvm_vcpu_csr *csr;
                                ^
   2 warnings generated.


vim +/csr +302 arch/riscv/kvm/vcpu_timer.c

   299	
   300	void kvm_riscv_vcpu_timer_restore(struct kvm_vcpu *vcpu)
   301	{
 > 302		struct kvm_vcpu_csr *csr;
   303		struct kvm_vcpu_timer *t = &vcpu->arch.timer;
   304	
   305		kvm_riscv_vcpu_update_timedelta(vcpu);
   306	
   307		if (!t->sstc_enabled)
   308			return;
   309	
   310		csr = &vcpu->arch.guest_csr;
   311	#if defined(CONFIG_32BIT)
   312		csr_write(CSR_VSTIMECMP, (u32)t->next_cycles);
   313		csr_write(CSR_VSTIMECMPH, (u32)(t->next_cycles >> 32));
   314	#else
   315		csr_write(CSR_VSTIMECMP, t->next_cycles);
   316	#endif
   317	
   318		/* timer should be enabled for the remaining operations */
   319		if (unlikely(!t->init_done))
   320			return;
   321	
   322		kvm_riscv_vcpu_timer_unblocking(vcpu);
   323	}
   324	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

                 reply	other threads:[~2022-07-23 11:43 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=202207231936.SWNvXLnK-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=Atish.Patra@wdc.com \
    --cc=anup@brainfault.org \
    --cc=atishp@rivosinc.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    /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