All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/ucode: replace redundant string literals
@ 2015-12-22 15:40 Jan Beulich
  2015-12-22 17:07 ` Borislav Petkov
  0 siblings, 1 reply; 8+ messages in thread
From: Jan Beulich @ 2015-12-22 15:40 UTC (permalink / raw)
  To: mingo, tglx, hpa; +Cc: Borislav Petkov, linux-kernel

This doesn't just eliminate needless redundancy (plus avoid a possible
disconnect if one string instance gets changed without the other(s)),
but also eliminates a warning some gcc versions emit ("array access
beyond array bounds", observed with 4.3.4) in the 32-bit case.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
 arch/x86/kernel/cpu/microcode/core.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

--- 4.4-rc6/arch/x86/kernel/cpu/microcode/core.c
+++ 4.4-rc6-x86-ucode-early-string/arch/x86/kernel/cpu/microcode/core.c
@@ -83,13 +83,11 @@ static bool __init check_loader_disabled
 {
 #ifdef CONFIG_X86_32
 	const char *cmdline = (const char *)__pa_nodebug(boot_command_line);
-	const char *opt	    = "dis_ucode_ldr";
-	const char *option  = (const char *)__pa_nodebug(opt);
+	const char *option  = (const char *)__pa_nodebug(__setup_str_disable_loader);
 	bool *res = (bool *)__pa_nodebug(&dis_ucode_ldr);
-
 #else /* CONFIG_X86_64 */
 	const char *cmdline = boot_command_line;
-	const char *option  = "dis_ucode_ldr";
+	const char *option  = __setup_str_disable_loader;
 	bool *res = &dis_ucode_ldr;
 #endif
 




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-01-05 20:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-22 15:40 [PATCH] x86/ucode: replace redundant string literals Jan Beulich
2015-12-22 17:07 ` Borislav Petkov
2015-12-22 17:20   ` Jan Beulich
2015-12-22 18:14     ` Borislav Petkov
2015-12-23 10:06       ` Jan Beulich
2015-12-23 10:10         ` Borislav Petkov
2015-12-23 10:11           ` Jan Beulich
2016-01-05 20:44             ` [PATCH] x86/microcode: Remove redundant __setup() param parsing Borislav Petkov

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.