Skip to contentSkip to conversation

arch/x86/mm/init_32.c: quiet sparse noise; local functions should be static

PATCH In review H Hartley Sweeten 2 participants 2 messages Sep 9, 2011 – Sep 11, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arch/x86/mm/init_32.c: quiet sparse noise; local functions should be static

Local functions should be marked static. This quiets the following sparse noise:

warning: symbol 'lowmem_pfn_init' was not declared. Should it be static?
warning: symbol 'highmem_pfn_init' was not declared. Should it be static?

Cc Thomas Gleixner <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc "H. Peter Anvin" <[email protected]>
Cc Tejun Heo <[email protected]>
Cc Yinghai Lu <[email protected]>
Cc Borislav Petkov <[email protected]>

---

arch/x86/mm/init_32.c +2 -2
index 29f7c6d..cc56c76 100644
@@ -560,7 +560,7 @@ early_param("highmem", parse_highmem);
  * artificially via the highmem=x boot parameter then create
  * it:
  */
-void __init lowmem_pfn_init(void)
+static void __init lowmem_pfn_init(void)
 {
 	/* max_low_pfn is 0, we already have early_res support */
 	max_low_pfn = max_pfn;
@@ -596,7 +596,7 @@ void __init lowmem_pfn_init(void)
  * We have more RAM than fits into lowmem - we try to put it into
  * highmem, also taking the highmem=x boot parameter into account:
  */
-void __init highmem_pfn_init(void)
+static void __init highmem_pfn_init(void)
 {
 	max_low_pfn = MAXMEM_PFN;
 
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · H Hartley Sweeten

Local functions should be marked static. This quiets the following sparse noise:

warning: symbol 'lowmem_pfn_init' was not declared. Should it be static?
warning: symbol 'highmem_pfn_init' was not declared. Should it be static?

Quoted 7 lines
Cc Thomas Gleixner <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc "H. Peter Anvin" <[email protected]>
Cc Tejun Heo <[email protected]>
Cc Yinghai Lu <[email protected]>
Cc Borislav Petkov <[email protected]>

Looks good to me.

Thanks.

Signature · 1 line
tejun