All of lore.kernel.org
 help / color / mirror / Atom feed
From: Emil Goode <emilgoode@gmail.com>
To: mtosatti@redhat.com, gleb@redhat.com, tglx@linutronix.de,
	mingo@redhat.com, hpa@zytor.com, avi@redhat.com, mst@redhat.com,
	perex@perex.cz, tiwai@suse.de, crimsun@ubuntu.com,
	wfp5p@virginia.edu, peter.senna@gmail.com
Cc: x86@kernel.org, kvm@vger.kernel.org, alsa-devel@alsa-project.org,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
	Emil Goode <emilgoode@gmail.com>
Subject: [PATCH 2/3] x86: KVM: Simplify function kvm_detect
Date: Sun, 27 Jan 2013 17:40:01 +0100	[thread overview]
Message-ID: <1359304802-28240-2-git-send-email-emilgoode@gmail.com> (raw)
In-Reply-To: <1359304802-28240-1-git-send-email-emilgoode@gmail.com>

The first patch in this series changed the kvm_para_available
function to return bool. We can now simplify the kvm_detect function
by directly returning the return value of kvm_para_available.

Signed-off-by: Emil Goode <emilgoode@gmail.com>
---
 arch/x86/kernel/kvm.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c
index 2b44ea5..3644908 100644
--- a/arch/x86/kernel/kvm.c
+++ b/arch/x86/kernel/kvm.c
@@ -497,9 +497,7 @@ void __init kvm_guest_init(void)
 
 static bool __init kvm_detect(void)
 {
-	if (!kvm_para_available())
-		return false;
-	return true;
+	return kvm_para_available();
 }
 
 const struct hypervisor_x86 x86_hyper_kvm __refconst = {
-- 
1.7.10.4

WARNING: multiple messages have this Message-ID (diff)
From: Emil Goode <emilgoode@gmail.com>
To: mtosatti@redhat.com, gleb@redhat.com, tglx@linutronix.de,
	mingo@redhat.com, hpa@zytor.com, avi@redhat.com, mst@redhat.com,
	perex@perex.cz, tiwai@suse.de, crimsun@ubuntu.com,
	wfp5p@virginia.edu, peter.senna@gmail.com
Cc: x86@kernel.org, kvm@vger.kernel.org, alsa-devel@alsa-project.org,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
	Emil Goode <emilgoode@gmail.com>
Subject: [PATCH 2/3] x86: KVM: Simplify function kvm_detect
Date: Sun, 27 Jan 2013 16:40:01 +0000	[thread overview]
Message-ID: <1359304802-28240-2-git-send-email-emilgoode@gmail.com> (raw)
In-Reply-To: <1359304802-28240-1-git-send-email-emilgoode@gmail.com>

The first patch in this series changed the kvm_para_available
function to return bool. We can now simplify the kvm_detect function
by directly returning the return value of kvm_para_available.

Signed-off-by: Emil Goode <emilgoode@gmail.com>
---
 arch/x86/kernel/kvm.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c
index 2b44ea5..3644908 100644
--- a/arch/x86/kernel/kvm.c
+++ b/arch/x86/kernel/kvm.c
@@ -497,9 +497,7 @@ void __init kvm_guest_init(void)
 
 static bool __init kvm_detect(void)
 {
-	if (!kvm_para_available())
-		return false;
-	return true;
+	return kvm_para_available();
 }
 
 const struct hypervisor_x86 x86_hyper_kvm __refconst = {
-- 
1.7.10.4


  reply	other threads:[~2013-01-27 16:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-27 16:40 [PATCH 1/3] x86: KVM: Fix warnings by returning bool Emil Goode
2013-01-27 16:40 ` Emil Goode
2013-01-27 16:40 ` Emil Goode [this message]
2013-01-27 16:40   ` [PATCH 2/3] x86: KVM: Simplify function kvm_detect Emil Goode
2013-01-27 16:40 ` [PATCH 3/3] ALSA: intel8x0: Check return value before assigning Emil Goode
2013-01-27 16:40   ` Emil Goode
2013-01-27 16:40   ` H. Peter Anvin
2013-01-27 16:40     ` H. Peter Anvin
2013-01-27 16:40     ` H. Peter Anvin
2013-01-28  8:47   ` Takashi Iwai
2013-01-28  8:47     ` Takashi Iwai
2013-01-29 16:36 ` [PATCH 1/3] x86: KVM: Fix warnings by returning bool Gleb Natapov
2013-01-29 16:36   ` Gleb Natapov

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=1359304802-28240-2-git-send-email-emilgoode@gmail.com \
    --to=emilgoode@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=avi@redhat.com \
    --cc=crimsun@ubuntu.com \
    --cc=gleb@redhat.com \
    --cc=hpa@zytor.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=mst@redhat.com \
    --cc=mtosatti@redhat.com \
    --cc=perex@perex.cz \
    --cc=peter.senna@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=tiwai@suse.de \
    --cc=wfp5p@virginia.edu \
    --cc=x86@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.