Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Olof Johansson and committed by
Linus Torvalds
6d101ba6 fc2fd5f0

+8 -8
+8 -8
kernel/sched/fair.c
··· 94 { 95 return -cpu; 96 } 97 #endif 98 99 #ifdef CONFIG_CFS_BANDWIDTH ··· 117 */ 118 unsigned int sysctl_sched_cfs_bandwidth_slice = 5000UL; 119 #endif 120 - 121 - /* 122 - * The margin used when comparing utilization with CPU capacity: 123 - * util * margin < capacity * 1024 124 - * 125 - * (default: ~20%) 126 - */ 127 - static unsigned int capacity_margin = 1280; 128 129 static inline void update_load_add(struct load_weight *lw, unsigned long inc) 130 {
··· 94 { 95 return -cpu; 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; 105 #endif 106 107 #ifdef CONFIG_CFS_BANDWIDTH ··· 109 */ 110 unsigned int sysctl_sched_cfs_bandwidth_slice = 5000UL; 111 #endif 112 113 static inline void update_load_add(struct load_weight *lw, unsigned long inc) 114 {