From: Peng Wu <wupeng58@huawei.com>
To: <maz@kernel.org>, <james.morse@arm.com>,
<alexandru.elisei@arm.com>, <catalin.marinas@arm.com>,
<will@kernel.org>
Cc: <linux-arm-kernel@lists.infradead.org>,
<kvmarm@lists.cs.columbia.edu>, <linux-kernel@vger.kernel.org>,
<liwei391@huawei.com>, <yuehaibing@huawei.com>,
<wupeng58@huawei.com>
Subject: [PATCH] KVM: arm64: cancel the return value check of kvm_arm_init_sve()
Date: Fri, 20 May 2022 08:49:11 +0000 [thread overview]
Message-ID: <20220520084911.44253-1-wupeng58@huawei.com> (raw)
Currently, kvm_arm_init_sve() has only a unique return value,
so change the return value type of kvm_arm_init_sve() to void.
Meanwhile, there's no need to check the return value of
kvm_arm_init_sve() in kvm_arch_init().
Signed-off-by: Peng Wu <wupeng58@huawei.com>
---
arch/arm64/kvm/arm.c | 4 +---
arch/arm64/kvm/reset.c | 4 +---
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c
index 400bb0fe2745..5ec90991c68e 100644
--- a/arch/arm64/kvm/arm.c
+++ b/arch/arm64/kvm/arm.c
@@ -2206,9 +2206,7 @@ int kvm_arch_init(void *opaque)
if (err)
return err;
- err = kvm_arm_init_sve();
- if (err)
- return err;
+ kvm_arm_init_sve();
err = kvm_arm_vmid_alloc_init();
if (err) {
diff --git a/arch/arm64/kvm/reset.c b/arch/arm64/kvm/reset.c
index 6c70c6f61c70..abae7b24eb8b 100644
--- a/arch/arm64/kvm/reset.c
+++ b/arch/arm64/kvm/reset.c
@@ -43,7 +43,7 @@ static u32 kvm_ipa_limit;
unsigned int kvm_sve_max_vl;
-int kvm_arm_init_sve(void)
+void kvm_arm_init_sve(void)
{
if (system_supports_sve()) {
kvm_sve_max_vl = sve_max_virtualisable_vl();
@@ -65,8 +65,6 @@ int kvm_arm_init_sve(void)
pr_warn("KVM: SVE vector length for guests limited to %u bytes\n",
kvm_sve_max_vl);
}
-
- return 0;
}
static int kvm_vcpu_enable_sve(struct kvm_vcpu *vcpu)
--
2.17.1
next reply other threads:[~2022-05-20 8:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-20 8:49 Peng Wu [this message]
2022-05-21 5:31 ` kernel test robot
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=20220520084911.44253-1-wupeng58@huawei.com \
--to=wupeng58@huawei.com \
--cc=alexandru.elisei@arm.com \
--cc=catalin.marinas@arm.com \
--cc=james.morse@arm.com \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liwei391@huawei.com \
--cc=maz@kernel.org \
--cc=will@kernel.org \
--cc=yuehaibing@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
all inboxes | Powered by JetHome®