From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754631AbbLVPkq (ORCPT ); Tue, 22 Dec 2015 10:40:46 -0500 Received: from prv-mh.provo.novell.com ([137.65.248.74]:55265 "EHLO prv-mh.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752117AbbLVPkp convert rfc822-to-8bit (ORCPT ); Tue, 22 Dec 2015 10:40:45 -0500 Message-Id: <56797D0B02000078000C24EC@prv-mh.provo.novell.com> X-Mailer: Novell GroupWise Internet Agent 14.2.0 Date: Tue, 22 Dec 2015 08:40:43 -0700 From: "Jan Beulich" To: , , Cc: "Borislav Petkov" , Subject: [PATCH] x86/ucode: replace redundant string literals Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8BIT Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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