[PATCH] x86/boot/edd: return from query_edd so early as we can if EDD disabled

From: Alexander Kuleshov
Date: Fri Jan 16 2015 - 05:50:32 EST


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@xxxxxxxxx>
---
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/