Skip to content

Commit

Permalink
sched/fair: Fix warning on non-SMP build
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Olof Johansson authored and Linus Torvalds committed Dec 27, 2018
1 parent fc2fd5f commit 6d101ba
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions kernel/sched/fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@ int __weak arch_asym_cpu_priority(int cpu)
{
return -cpu;
}

/*
* The margin used when comparing utilization with CPU capacity:
* util * margin < capacity * 1024
*
* (default: ~20%)
*/
static unsigned int capacity_margin = 1280;
#endif

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

/*
* The margin used when comparing utilization with CPU capacity:
* util * margin < capacity * 1024
*
* (default: ~20%)
*/
static unsigned int capacity_margin = 1280;

static inline void update_load_add(struct load_weight *lw, unsigned long inc)
{
lw->weight += inc;
Expand Down

0 comments on commit 6d101ba

Please sign in to comment.