Skip to contentSkip to conversation

mm/page_alloc: Mark some symbols with static keyword

PATCH Applied Zou Wei 2 participants 2 messages Nov 16, 2020 – Nov 27, 2020

Subsystems (2)
lore
Share & tools
lore

Zou Wei

author
#0 lore raw

PATCH 1/1 mm/page_alloc: Mark some symbols with static keyword

Fix the following sparse warnings:

mm/page_alloc.c:3040:6: warning: symbol '__drain_all_pages' was not declared. Should it be static? mm/page_alloc.c:6349:6: warning: symbol '__zone_set_pageset_high_and_batch' was not declared. Should it be static?

---
 mm/page_alloc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
mm/page_alloc.c +2 -2
index 63d8d8b..e7548344 100644
@@ -3037,7 +3037,7 @@ static void drain_local_pages_wq(struct work_struct *work)
  * that need the guarantee that every CPU has drained can disable the
  * optimizing racy check.
  */
-void __drain_all_pages(struct zone *zone, bool force_all_cpus)
+static void __drain_all_pages(struct zone *zone, bool force_all_cpus)
 {
 	int cpu;
 
@@ -6346,7 +6346,7 @@ static void pageset_init(struct per_cpu_pageset *p)
 	pcp->batch = BOOT_PAGESET_BATCH;
 }
 
-void __zone_set_pageset_high_and_batch(struct zone *zone, unsigned long high,
+static void __zone_set_pageset_high_and_batch(struct zone *zone, unsigned long high,
 		unsigned long batch)
 {
 	struct per_cpu_pageset *p;
Signature · 1 line
2.6.2
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Zou Wei

Fix the following sparse warnings:

mm/page_alloc.c:3040:6: warning: symbol '__drain_all_pages' was not declared. Should it be static? mm/page_alloc.c:6349:6: warning: symbol '__zone_set_pageset_high_and_batch' was not declared. Should it be static?

Quoted 27 lines
---
  mm/page_alloc.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
mm/page_alloc.c +2 -2
index 63d8d8b..e7548344 100644
@@ -3037,7 +3037,7 @@ static void drain_local_pages_wq(struct work_struct *work)
   * that need the guarantee that every CPU has drained can disable the
   * optimizing racy check.
   */
-void __drain_all_pages(struct zone *zone, bool force_all_cpus)
+static void __drain_all_pages(struct zone *zone, bool force_all_cpus)
  {
  	int cpu;
 
@@ -6346,7 +6346,7 @@ static void pageset_init(struct per_cpu_pageset *p)
  	pcp->batch = BOOT_PAGESET_BATCH;
  }
 
-void __zone_set_pageset_high_and_batch(struct zone *zone, unsigned long high,
+static void __zone_set_pageset_high_and_batch(struct zone *zone, unsigned long high,
  		unsigned long batch)
  {
  	struct per_cpu_pageset *p;