lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202207250337.g5uiYvdz-lkp@intel.com>
Date:   Mon, 25 Jul 2022 03:44:02 +0800
From:   kernel test robot <lkp@...el.com>
To:     Atish Patra <atishp@...osinc.com>
Cc:     kbuild-all@...ts.01.org, Atish Patra <Atish.Patra@....com>,
        linux-kernel@...r.kernel.org, Anup Patel <anup@...infault.org>
Subject: [atishp04:sstc_v5 5/5] arch/riscv/kvm/vcpu_timer.c:302:30: warning:
 variable 'csr' set but not used

tree:   https://github.com/atishp04/linux sstc_v5
head:   1b65346e11303beea1c67b3557ae56aee68e7a57
commit: 1b65346e11303beea1c67b3557ae56aee68e7a57 [5/5] RISC-V: KVM: Support sstc extension
config: riscv-randconfig-r013-20220718 (https://download.01.org/0day-ci/archive/20220725/202207250337.g5uiYvdz-lkp@intel.com/config)
compiler: riscv32-linux-gcc (GCC) 12.1.0
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/atishp04/linux/commit/1b65346e11303beea1c67b3557ae56aee68e7a57
        git remote add atishp04 https://github.com/atishp04/linux
        git fetch --no-tags atishp04 sstc_v5
        git checkout 1b65346e11303beea1c67b3557ae56aee68e7a57
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 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@...el.com>

All warnings (new ones prefixed by >>):

   arch/riscv/kvm/vcpu_timer.c: In function 'kvm_riscv_vcpu_timer_restore':
>> arch/riscv/kvm/vcpu_timer.c:302:30: warning: variable 'csr' set but not used [-Wunused-but-set-variable]
     302 |         struct kvm_vcpu_csr *csr;
         |                              ^~~
   arch/riscv/kvm/vcpu_timer.c: In function 'kvm_riscv_vcpu_timer_save':
   arch/riscv/kvm/vcpu_timer.c:327:30: warning: variable 'csr' set but not used [-Wunused-but-set-variable]
     327 |         struct kvm_vcpu_csr *csr;
         |                              ^~~


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ