diff options
author | Olof Johansson <olof@lixom.net> | 2018-11-25 17:41:05 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-12-27 13:40:15 -0500 |
commit | 6d101ba6be2a26a3e1f513b5e293f0fd2b79ec5c (patch) | |
tree | 0666f64d4c38aec9687ccbc2bb9fd4c70c32e7d0 | |
parent | fc2fd5f0f1aa85925be2322275ee2dc5ac3acdf4 (diff) |
sched/fair: Fix warning on non-SMP build
Caused by making the variable static:
kernel/sched/fair.c:119:21: warning: 'capacity_margin' defined but not used [-Wunused-variable]
Seems easiest to just move it up under the existing ifdef CONFIG_SMP
that's a few lines above.
Fixes: ed8885a14433a ('sched/fair: Make some variables static')
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | kernel/sched/fair.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 1c1cfbf6ba0c..d1907506318a 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c | |||
@@ -94,6 +94,14 @@ int __weak arch_asym_cpu_priority(int cpu) | |||
94 | { | 94 | { |
95 | return -cpu; | 95 | return -cpu; |
96 | } | 96 | } |
97 | |||
98 | /* | ||
99 | * The margin used when comparing utilization with CPU capacity: | ||
100 | * util * margin < capacity * 1024 | ||
101 | * | ||
102 | * (default: ~20%) | ||
103 | */ | ||
104 | static unsigned int capacity_margin = 1280; | ||
97 | #endif | 105 | #endif |
98 | 106 | ||
99 | #ifdef CONFIG_CFS_BANDWIDTH | 107 | #ifdef CONFIG_CFS_BANDWIDTH |
@@ -110,14 +118,6 @@ int __weak arch_asym_cpu_priority(int cpu) | |||
110 | unsigned int sysctl_sched_cfs_bandwidth_slice = 5000UL; | 118 | unsigned int sysctl_sched_cfs_bandwidth_slice = 5000UL; |
111 | #endif | 119 | #endif |
112 | 120 | ||
113 | /* | ||
114 | * The margin used when comparing utilization with CPU capacity: | ||
115 | * util * margin < capacity * 1024 | ||
116 | * | ||
117 | * (default: ~20%) | ||
118 | */ | ||
119 | static unsigned int capacity_margin = 1280; | ||
120 | |||
121 | static inline void update_load_add(struct load_weight *lw, unsigned long inc) | 121 | static inline void update_load_add(struct load_weight *lw, unsigned long inc) |
122 | { | 122 | { |
123 | lw->weight += inc; | 123 | lw->weight += inc; |