From: kernel test robot <lkp@intel.com>
To: Mayuresh Chitale <mchitale@ventanamicro.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
Anup Patel <anup@brainfault.org>,
Andrew Jones <ajones@ventanamicro.com>
Subject: arch/riscv/kvm/vcpu_onereg.c:486 kvm_riscv_vcpu_set_reg_csr() warn: inconsistent indenting
Date: Tue, 19 Dec 2023 07:37:06 +0800 [thread overview]
Message-ID: <202312190719.kBuYl6oJ-lkp@intel.com> (raw)
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(®_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
reply other threads:[~2023-12-18 23:37 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=202312190719.kBuYl6oJ-lkp@intel.com \
--to=lkp@intel.com \
--cc=ajones@ventanamicro.com \
--cc=anup@brainfault.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchitale@ventanamicro.com \
--cc=oe-kbuild-all@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
all inboxes | Powered by JetHome®