sched/fair: Fix warning on non-SMP build
authorOlof Johansson <olof@lixom.net>
Sun, 25 Nov 2018 22:41:05 +0000 (14:41 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 27 Dec 2018 18:40:15 +0000 (10:40 -0800)
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>
kernel/sched/fair.c

index 1c1cfbf6ba0c99e026d5672c1d9879e483e189b0..d1907506318a4c7f22e71e9b8b63203fd20483e7 100644 (file)
@@ -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;