Skip to contentSkip to conversation

x86/boot/KASLR: Make local variable mem_limit static

PATCH New zhong jiang 2 participants 2 messages Jul 30, 2018 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/boot/KASLR: Make local variable mem_limit static

Fix the following sparse warning:

arch/x86/boot/compressed/kaslr.c:102:20: warning: symbol 'mem_limit' was not declared. Should it be static?

---
 arch/x86/boot/compressed/kaslr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/boot/compressed/kaslr.c +1 -1
index 5aae509..d1e19f3 100644
@@ -99,7 +99,7 @@ struct mem_vector {
 
 
 /* Store memory limit specified by "mem=nn[KMG]" or "memmap=nn[KMG]" */
-unsigned long long mem_limit = ULLONG_MAX;
+static unsigned long long mem_limit = ULLONG_MAX;
 
 
 enum mem_avoid_index {
Signature · 1 line
1.7.12.4
#1 lore raw
x86/boot/KASLR: Make local variable mem_limit static
Commit-ID:  5db1b1e1ee34871b1965b3f890e3ccbdb185fa52
Gitweb:     https://git.kernel.org/tip/5db1b1e1ee34871b1965b3f890e3ccbdb185fa52
Author:     zhong jiang <[email protected]>
AuthorDate: Mon, 30 Jul 2018 21:44:33 +0800
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Mon, 30 Jul 2018 19:46:03 +0200

x86/boot/KASLR: Make local variable mem_limit static

Fix the following sparse warning:

arch/x86/boot/compressed/kaslr.c:102:20: warning: symbol 'mem_limit' was not declared. Should it be static?

---
 arch/x86/boot/compressed/kaslr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/boot/compressed/kaslr.c +1 -1
index 531c9876f573..302517929932 100644
@@ -102,7 +102,7 @@ static bool memmap_too_large;
 
 
 /* Store memory limit specified by "mem=nn[KMG]" or "memmap=nn[KMG]" */
-unsigned long long mem_limit = ULLONG_MAX;
+static unsigned long long mem_limit = ULLONG_MAX;
 
 
 enum mem_avoid_index {