[arm-platforms:kvm-arm64/nv-5.16 48/71] arch/arm64/kvm/arch_timer.c:662:17: warning: variable 'ret' set but not used

kernel test robot lkp at intel.com
Sun Nov 28 11:28:07 PST 2021


tree:   https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git kvm-arm64/nv-5.16
head:   6162310e2419353608acd8f247bde3fc848d4f64
commit: 104bde3af73096bb751f6999c335a830c77ae4a7 [48/71] KVM: arm64: nv: arch_timer: Support hyp timer emulation
config: arm64-allyesconfig (https://download.01.org/0day-ci/archive/20211129/202111290317.lfnmM6ai-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 11.2.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://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/commit/?id=104bde3af73096bb751f6999c335a830c77ae4a7
        git remote add arm-platforms https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git
        git fetch --no-tags arm-platforms kvm-arm64/nv-5.16
        git checkout 104bde3af73096bb751f6999c335a830c77ae4a7
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm64 SHELL=/bin/bash arch/arm64/kvm/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>

All warnings (new ones prefixed by >>):

   arch/arm64/kvm/arch_timer.c: In function 'kvm_timer_vcpu_load_nested_switch':
>> arch/arm64/kvm/arch_timer.c:662:17: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
     662 |         int hw, ret;
         |                 ^~~


vim +/ret +662 arch/arm64/kvm/arch_timer.c

   658	
   659	static void kvm_timer_vcpu_load_nested_switch(struct kvm_vcpu *vcpu,
   660						      struct timer_map *map)
   661	{
 > 662		int hw, ret;
   663	
   664		if (!irqchip_in_kernel(vcpu->kvm))
   665			return;
   666	
   667		/*
   668		 * We only ever unmap the vtimer irq on a VHE system that runs nested
   669		 * virtualization, in which case we have both a valid emul_vtimer,
   670		 * emul_ptimer, direct_vtimer, and direct_ptimer.
   671		 *
   672		 * Since this is called from kvm_timer_vcpu_load(), a change between
   673		 * vEL2 and vEL1/0 will have just happened, and the timer_map will
   674		 * represent this, and therefore we switch the emul/direct mappings
   675		 * below.
   676		 */
   677		hw = kvm_vgic_get_map(vcpu, map->direct_vtimer->irq.irq);
   678		if (hw < 0) {
   679			kvm_vgic_unmap_phys_irq(vcpu, map->emul_vtimer->irq.irq);
   680			kvm_vgic_unmap_phys_irq(vcpu, map->emul_ptimer->irq.irq);
   681	
   682			ret = kvm_vgic_map_phys_irq(vcpu,
   683						    map->direct_vtimer->host_timer_irq,
   684						    map->direct_vtimer->irq.irq,
   685						    &arch_timer_irq_ops);
   686			ret = kvm_vgic_map_phys_irq(vcpu,
   687						    map->direct_ptimer->host_timer_irq,
   688						    map->direct_ptimer->irq.irq,
   689						    &arch_timer_irq_ops);
   690		}
   691	}
   692	

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



More information about the linux-arm-kernel mailing list