Skip to content

Commit 6d101ba

Browse files
olofjtorvalds
authored andcommitted
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: ed8885a ('sched/fair: Make some variables static') Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent fc2fd5f commit 6d101ba

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

kernel/sched/fair.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,14 @@ int __weak arch_asym_cpu_priority(int cpu)
9494
{
9595
return -cpu;
9696
}
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;
97105
#endif
98106

99107
#ifdef CONFIG_CFS_BANDWIDTH
@@ -110,14 +118,6 @@ int __weak arch_asym_cpu_priority(int cpu)
110118
unsigned int sysctl_sched_cfs_bandwidth_slice = 5000UL;
111119
#endif
112120

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-
121121
static inline void update_load_add(struct load_weight *lw, unsigned long inc)
122122
{
123123
lw->weight += inc;

0 commit comments

Comments
 (0)