mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexander Kuleshov <kuleshovmail@gmail.com>
To: "H. Peter Anvin" <hpa@zytor.com>, Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>,
	x86@kernel.org, linux-kernel@vger.kernel.org,
	Alexander Kuleshov <kuleshovmail@gmail.com>
Subject: [PATCH] x86/boot/edd: return from query_edd so early as we can if EDD disabled
Date: Fri, 16 Jan 2015 16:50:17 +0600	[thread overview]
Message-ID: <1421405417-23041-1-git-send-email-kuleshovmail@gmail.com> (raw)

Return from query_edd routine as early as we can if CONFIG_EDD_OFF was set 'Y'
and 'edd=on | skip[mbr]' parameter have not been transfered to the kernel.

Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
---
 arch/x86/boot/edd.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/x86/boot/edd.c b/arch/x86/boot/edd.c
index 223e425..79040d6 100644
--- a/arch/x86/boot/edd.c
+++ b/arch/x86/boot/edd.c
@@ -139,19 +139,19 @@ void query_edd(void)
 			do_mbr = 0;
 		}
 		else if (!strcmp(eddarg, "off"))
-			do_edd = 0;
+			return;
 		else if (!strcmp(eddarg, "on"))
 			do_edd = 1;
 	}
 
+	if (!do_edd)
+		return;
+
 	be_quiet = cmdline_find_option_bool("quiet");
 
 	edp    = boot_params.eddbuf;
 	mbrptr = boot_params.edd_mbr_sig_buffer;
 
-	if (!do_edd)
-		return;
-
 	/* Bugs in OnBoard or AddOnCards Bios may hang the EDD probe,
 	 * so give a hint if this happens.
 	 */
-- 
2.3.0.rc0.44.ga94655d.dirty


                 reply	other threads:[~2015-01-16 10:50 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=1421405417-23041-1-git-send-email-kuleshovmail@gmail.com \
    --to=kuleshovmail@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --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 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®