Skip to content

Commit 4fe64a6

Browse files
valdiskKAGA-KOKO
authored andcommitted
x86/mm/pti: Make local symbols static
With 'make C=2 W=1', sparse and gcc both complain: CHECK arch/x86/mm/pti.c arch/x86/mm/pti.c:84:3: warning: symbol 'pti_mode' was not declared. Should it be static? arch/x86/mm/pti.c:605:6: warning: symbol 'pti_set_kernel_image_nonglobal' was not declared. Should it be static? CC arch/x86/mm/pti.o arch/x86/mm/pti.c:605:6: warning: no previous prototype for 'pti_set_kernel_image_nonglobal' [-Wmissing-prototypes] 605 | void pti_set_kernel_image_nonglobal(void) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ pti_set_kernel_image_nonglobal() is only used locally. 'pti_mode' exists in drivers/hwtracing/intel_th/pti.c as well, but it's a completely unrelated local (static) symbol. Make both static. Signed-off-by: Valdis Kletnieks <valdis.kletnieks@vt.edu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Andy Lutomirski <luto@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lkml.kernel.org/r/27680.1552376873@turing-police
1 parent 0f4d3aa commit 4fe64a6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/x86/mm/pti.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ static void __init pti_print_if_secure(const char *reason)
7777
pr_info("%s\n", reason);
7878
}
7979

80-
enum pti_mode {
80+
static enum pti_mode {
8181
PTI_AUTO = 0,
8282
PTI_FORCE_OFF,
8383
PTI_FORCE_ON
@@ -602,7 +602,7 @@ static void pti_clone_kernel_text(void)
602602
set_memory_global(start, (end_global - start) >> PAGE_SHIFT);
603603
}
604604

605-
void pti_set_kernel_image_nonglobal(void)
605+
static void pti_set_kernel_image_nonglobal(void)
606606
{
607607
/*
608608
* The identity map is created with PMDs, regardless of the

0 commit comments

Comments
 (0)