mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* arch/riscv/kvm/vcpu_onereg.c:486 kvm_riscv_vcpu_set_reg_csr() warn: inconsistent indenting
@ 2023-12-18 23:37 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-12-18 23:37 UTC (permalink / raw)
  To: Mayuresh Chitale; +Cc: oe-kbuild-all, linux-kernel, Anup Patel, Andrew Jones

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   2cf4f94d8e8646803f8fb0facf134b0cd7fb691a
commit: c04913f2b54ee86be34d1a1e9df7b7876b12b8c0 RISCV: KVM: Add sstateen0 to ONE_REG
date:   10 weeks ago
config: riscv-randconfig-r071-20231218 (https://download.01.org/0day-ci/archive/20231219/202312190719.kBuYl6oJ-lkp@intel.com/config)
compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project.git 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a)

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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312190719.kBuYl6oJ-lkp@intel.com/

smatch warnings:
arch/riscv/kvm/vcpu_onereg.c:486 kvm_riscv_vcpu_set_reg_csr() warn: inconsistent indenting

vim +486 arch/riscv/kvm/vcpu_onereg.c

   454	
   455	static int kvm_riscv_vcpu_set_reg_csr(struct kvm_vcpu *vcpu,
   456					      const struct kvm_one_reg *reg)
   457	{
   458		int rc;
   459		unsigned long __user *uaddr =
   460				(unsigned long __user *)(unsigned long)reg->addr;
   461		unsigned long reg_num = reg->id & ~(KVM_REG_ARCH_MASK |
   462						    KVM_REG_SIZE_MASK |
   463						    KVM_REG_RISCV_CSR);
   464		unsigned long reg_val, reg_subtype;
   465	
   466		if (KVM_REG_SIZE(reg->id) != sizeof(unsigned long))
   467			return -EINVAL;
   468	
   469		if (copy_from_user(&reg_val, uaddr, KVM_REG_SIZE(reg->id)))
   470			return -EFAULT;
   471	
   472		reg_subtype = reg_num & KVM_REG_RISCV_SUBTYPE_MASK;
   473		reg_num &= ~KVM_REG_RISCV_SUBTYPE_MASK;
   474		switch (reg_subtype) {
   475		case KVM_REG_RISCV_CSR_GENERAL:
   476			rc = kvm_riscv_vcpu_general_set_csr(vcpu, reg_num, reg_val);
   477			break;
   478		case KVM_REG_RISCV_CSR_AIA:
   479			rc = kvm_riscv_vcpu_aia_set_csr(vcpu, reg_num, reg_val);
   480			break;
   481		case KVM_REG_RISCV_CSR_SMSTATEEN:
   482			rc = -EINVAL;
   483			if (riscv_has_extension_unlikely(RISCV_ISA_EXT_SMSTATEEN))
   484				rc = kvm_riscv_vcpu_smstateen_set_csr(vcpu, reg_num,
   485								      reg_val);
 > 486	break;
   487		default:
   488			rc = -ENOENT;
   489			break;
   490		}
   491		if (rc)
   492			return rc;
   493	
   494		return 0;
   495	}
   496	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-12-18 23:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-18 23:37 arch/riscv/kvm/vcpu_onereg.c:486 kvm_riscv_vcpu_set_reg_csr() warn: inconsistent indenting kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®