[linux-next:master 6145/8213] arch/s390/kvm/kvm-s390.c:4315:5-8: Unneeded variable: "ret". Return " 0" on line 4327

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   17cb8a20bde66a520a2ca7aad1063e1ce7382240
commit: b988b1bb0053c0dcd26187d29ef07566a565cf55 [6145/8213] KVM: s390: fix setting of fpc register
config: s390-randconfig-r053-20231216 (https://download.01.org/0day-ci/archive/20231216/202312161632.vbRyBScY-lkp@xxxxxxxxx/config)
compiler: s390-linux-gcc (GCC) 13.2.0

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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312161632.vbRyBScY-lkp@xxxxxxxxx/

cocci warnings: (new ones prefixed by >>)
>> arch/s390/kvm/kvm-s390.c:4315:5-8: Unneeded variable: "ret". Return "  0" on line 4327

vim +4315 arch/s390/kvm/kvm-s390.c

b0c632db637d68 Heiko Carstens        2008-03-25  4312  
b0c632db637d68 Heiko Carstens        2008-03-25  4313  int kvm_arch_vcpu_ioctl_set_fpu(struct kvm_vcpu *vcpu, struct kvm_fpu *fpu)
b0c632db637d68 Heiko Carstens        2008-03-25  4314  {
6a96bc7fa0cdd9 Christoffer Dall      2017-12-04 @4315  	int ret = 0;
6a96bc7fa0cdd9 Christoffer Dall      2017-12-04  4316  
6a96bc7fa0cdd9 Christoffer Dall      2017-12-04  4317  	vcpu_load(vcpu);
6a96bc7fa0cdd9 Christoffer Dall      2017-12-04  4318  
e1788bb995befe Christian Borntraeger 2016-11-22  4319  	vcpu->run->s.regs.fpc = fpu->fpc;
9abc2a08a7d665 David Hildenbrand     2016-01-14  4320  	if (MACHINE_HAS_VX)
a7d4b8f2565ad0 David Hildenbrand     2016-08-16  4321  		convert_fp_to_vx((__vector128 *) vcpu->run->s.regs.vrs,
a7d4b8f2565ad0 David Hildenbrand     2016-08-16  4322  				 (freg_t *) fpu->fprs);
9abc2a08a7d665 David Hildenbrand     2016-01-14  4323  	else
a7d4b8f2565ad0 David Hildenbrand     2016-08-16  4324  		memcpy(vcpu->run->s.regs.fprs, &fpu->fprs, sizeof(fpu->fprs));
6a96bc7fa0cdd9 Christoffer Dall      2017-12-04  4325  
6a96bc7fa0cdd9 Christoffer Dall      2017-12-04  4326  	vcpu_put(vcpu);
6a96bc7fa0cdd9 Christoffer Dall      2017-12-04 @4327  	return ret;
b0c632db637d68 Heiko Carstens        2008-03-25  4328  }
b0c632db637d68 Heiko Carstens        2008-03-25  4329  

:::::: The code at line 4315 was first introduced by commit
:::::: 6a96bc7fa0cdd96bac2b8298d708a94f8de6f6d4 KVM: Move vcpu_load to arch-specific kvm_arch_vcpu_ioctl_set_fpu

:::::: TO: Christoffer Dall <christoffer.dall@xxxxxxxxxx>
:::::: CC: Paolo Bonzini <pbonzini@xxxxxxxxxx>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux