From: zhangshaokun@hisilicon.com (Shaokun Zhang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] KVM: arm64: remove the unnecessary function check
Date: Fri, 31 Aug 2018 17:42:59 +0800 [thread overview]
Message-ID: <1535708579-12233-1-git-send-email-zhangshaokun@hisilicon.com> (raw)
init_common_resources always return 0 and it is redundant to check the
return value, let's make it void to simplify the code.
Cc: Christoffer Dall <christoffer.dall@arm.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com>
---
virt/kvm/arm/arm.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/virt/kvm/arm/arm.c b/virt/kvm/arm/arm.c
index c92053b..66a29c9 100644
--- a/virt/kvm/arm/arm.c
+++ b/virt/kvm/arm/arm.c
@@ -1406,13 +1406,11 @@ static inline void hyp_cpu_pm_exit(void)
}
#endif
-static int init_common_resources(void)
+static void init_common_resources(void)
{
/* set size of VMID supported by CPU */
kvm_vmid_bits = kvm_get_vmid_bits();
kvm_info("%d-bit VMID\n", kvm_vmid_bits);
-
- return 0;
}
static int init_subsystems(void)
@@ -1655,9 +1653,7 @@ int kvm_arch_init(void *opaque)
}
}
- err = init_common_resources();
- if (err)
- return err;
+ init_common_resources();
in_hyp_mode = is_kernel_in_hyp_mode();
--
2.7.4
next reply other threads:[~2018-08-31 9:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-31 9:42 Shaokun Zhang [this message]
2018-10-08 16:18 ` [PATCH] KVM: arm64: remove the unnecessary function check Marc Zyngier
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=1535708579-12233-1-git-send-email-zhangshaokun@hisilicon.com \
--to=zhangshaokun@hisilicon.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).