Skip to content

Commit 275d90f

Browse files
KAGA-KOKOgregkh
authored andcommitted
x86/speculation: Mark string arrays const correctly
commit 8770709 upstream checkpatch.pl muttered when reshuffling the code: WARNING: static const char * array should probably be static const char * const Fix up all the string arrays. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Ingo Molnar <mingo@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Andy Lutomirski <luto@kernel.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Jiri Kosina <jkosina@suse.cz> Cc: Tom Lendacky <thomas.lendacky@amd.com> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: David Woodhouse <dwmw@amazon.co.uk> Cc: Tim Chen <tim.c.chen@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Dave Hansen <dave.hansen@intel.com> Cc: Casey Schaufler <casey.schaufler@intel.com> Cc: Asit Mallick <asit.k.mallick@intel.com> Cc: Arjan van de Ven <arjan@linux.intel.com> Cc: Jon Masters <jcm@redhat.com> Cc: Waiman Long <longman9394@gmail.com> Cc: Greg KH <gregkh@linuxfoundation.org> Cc: Dave Stewart <david.c.stewart@intel.com> Cc: Kees Cook <keescook@chromium.org> Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20181125185004.800018931@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 10c24dc commit 275d90f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎arch/x86/kernel/cpu/bugs.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ enum spectre_v2_mitigation_cmd {
237237
SPECTRE_V2_CMD_RETPOLINE_AMD,
238238
};
239239

240-
static const char *spectre_v2_strings[] = {
240+
static const char * const spectre_v2_strings[] = {
241241
[SPECTRE_V2_NONE] = "Vulnerable",
242242
[SPECTRE_V2_RETPOLINE_GENERIC] = "Mitigation: Full generic retpoline",
243243
[SPECTRE_V2_RETPOLINE_AMD] = "Mitigation: Full AMD retpoline",
@@ -474,7 +474,7 @@ enum ssb_mitigation_cmd {
474474
SPEC_STORE_BYPASS_CMD_SECCOMP,
475475
};
476476

477-
static const char *ssb_strings[] = {
477+
static const char * const ssb_strings[] = {
478478
[SPEC_STORE_BYPASS_NONE] = "Vulnerable",
479479
[SPEC_STORE_BYPASS_DISABLE] = "Mitigation: Speculative Store Bypass disabled",
480480
[SPEC_STORE_BYPASS_PRCTL] = "Mitigation: Speculative Store Bypass disabled via prctl",
@@ -814,7 +814,7 @@ early_param("l1tf", l1tf_cmdline);
814814
#define L1TF_DEFAULT_MSG "Mitigation: PTE Inversion"
815815

816816
#if IS_ENABLED(CONFIG_KVM_INTEL)
817-
static const char *l1tf_vmx_states[] = {
817+
static const char * const l1tf_vmx_states[] = {
818818
[VMENTER_L1D_FLUSH_AUTO] = "auto",
819819
[VMENTER_L1D_FLUSH_NEVER] = "vulnerable",
820820
[VMENTER_L1D_FLUSH_COND] = "conditional cache flushes",

0 commit comments

Comments
 (0)