From: Olof Johansson Date: Sun, 25 Nov 2018 22:41:05 +0000 (-0800) Subject: sched/fair: Fix warning on non-SMP build X-Git-Tag: v5.15~7341 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6d101ba6be2a26a3e1f513b5e293f0fd2b79ec5c;p=platform%2Fkernel%2Flinux-starfive.git 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 Signed-off-by: Linus Torvalds --- diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 1c1cfbf..d190750 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -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 @@ -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;