public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: chenqingyun001@208suo.com
To: maz@kernel.org, oliver.upton@linux.dev, catalin.marinas@arm.com,
	will@kernel.org
Cc: kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org,
	james.morse@arm.com, suzuki.poulose@arm.com,
	yuzenghui@huawei.com
Subject: [PATCH] KVM: arm64:Use #include <linux/cpufeature.h> instead of <asm/cpufeature.h>        trailing whitespace     braces {} are not necessary for any arm of this statement
Date: Thu, 13 Jul 2023 11:03:44 +0800	[thread overview]
Message-ID: <ef2ecfd960b2141b143003cc41ee551a@208suo.com> (raw)
In-Reply-To: <tencent_1B7BA6D8EFD533563E01F8EB64A145417008@qq.com>

include <linux/cpufeature.h> is a generic
Having extra spaces or tabs has no real effect
If there is only one statement in the if branch,
curly braces {} can be omitted

Signed-off-by: Qingyun Chen <chenqingyun001@208suo.com>
---
  arch/arm64/kvm/reset.c | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm64/kvm/reset.c b/arch/arm64/kvm/reset.c
index b5dee8e57e77..4e6305dd1909 100644
--- a/arch/arm64/kvm/reset.c
+++ b/arch/arm64/kvm/reset.c
@@ -19,7 +19,7 @@

  #include <kvm/arm_arch_timer.h>

-#include <asm/cpufeature.h>
+#include <linux/cpufeature.h>
  #include <asm/cputype.h>
  #include <asm/fpsimd.h>
  #include <asm/ptrace.h>
@@ -122,7 +122,7 @@ static int kvm_vcpu_finalize_sve(struct kvm_vcpu 
*vcpu)
          kfree(buf);
          return ret;
      }
-
+
      vcpu->arch.sve_state = buf;
      vcpu_set_flag(vcpu, VCPU_SVE_FINALIZED);
      return 0;
@@ -308,9 +308,9 @@ int kvm_reset_vcpu(struct kvm_vcpu *vcpu)

      switch (vcpu->arch.target) {
      default:
-        if (vcpu_el1_is_32bit(vcpu)) {
+        if (vcpu_el1_is_32bit(vcpu))
              pstate = VCPU_RESET_PSTATE_SVC;
-        } else if (vcpu_has_nv(vcpu)) {
+        else if (vcpu_has_nv(vcpu)) {
              pstate = VCPU_RESET_PSTATE_EL2;
          } else {
              pstate = VCPU_RESET_PSTATE_EL1;

       reply	other threads:[~2023-07-13  3:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <tencent_1B7BA6D8EFD533563E01F8EB64A145417008@qq.com>
2023-07-13  3:03 ` chenqingyun001 [this message]
2023-07-13  4:54   ` [PATCH] KVM: arm64:Use #include <linux/cpufeature.h> instead of <asm/cpufeature.h> trailing whitespace braces {} are not necessary for any arm of this statement Oliver Upton

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=ef2ecfd960b2141b143003cc41ee551a@208suo.com \
    --to=chenqingyun001@208suo.com \
    --cc=catalin.marinas@arm.com \
    --cc=james.morse@arm.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=oliver.upton@linux.dev \
    --cc=suzuki.poulose@arm.com \
    --cc=will@kernel.org \
    --cc=yuzenghui@huawei.com \
    /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