summaryrefslogtreecommitdiffstats
path: root/mm/page_alloc.c
diff options
context:
space:
mode:
authorRasmus Villemoes <linux@rasmusvillemoes.dk>2015-06-24 19:56:28 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-06-24 20:49:41 -0400
commita9919c79359df9a706ff9e14fc0a93cd15791c9b (patch)
tree32bb182bd88f0fb58bfe891b26290bf53b5a6d37 /mm/page_alloc.c
parenta67a31fa308a9032ead31b0501dafdb44ccf5a12 (diff)
mm: only define hashdist variable when needed
For !CONFIG_NUMA, hashdist will always be 0, since it's setter is otherwise compiled out. So we can save 4 bytes of data and some .text (although mostly in __init functions) by only defining it for CONFIG_NUMA. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Acked-by: David Rientjes <rientjes@google.com> Reviewed-by: Michal Hocko <mhocko@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r--mm/page_alloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index ebffa0e4a9c0..159dbbc3375d 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -6013,9 +6013,9 @@ out:
6013 return ret; 6013 return ret;
6014} 6014}
6015 6015
6016#ifdef CONFIG_NUMA
6016int hashdist = HASHDIST_DEFAULT; 6017int hashdist = HASHDIST_DEFAULT;
6017 6018
6018#ifdef CONFIG_NUMA
6019static int __init set_hashdist(char *str) 6019static int __init set_hashdist(char *str)
6020{ 6020{
6021 if (!str) 6021 if (!str)