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

Configure Feed

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

sched/fair: Remove CONFIG_CFS_BANDWIDTH=n definition of cfs_bandwidth_used()

Andy reported that clang gets upset with CONFIG_CFS_BANDWIDTH=n:

kernel/sched/fair.c:6580:20: error: unused function 'cfs_bandwidth_used' [-Werror,-Wunused-function]
6580 | static inline bool cfs_bandwidth_used(void)
| ^~~~~~~~~~~~~~~~~~

Indeed, cfs_bandwidth_used() is only used within functions defined under
CONFIG_CFS_BANDWIDTH=y. Remove its CONFIG_CFS_BANDWIDTH=n declaration &
definition.

Reported-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Valentin Schneider <vschneid@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20241127165501.160004-1-vschneid@redhat.com

authored by

Valentin Schneider and committed by
Peter Zijlstra
a76328d4 3a181f20

-7
-7
kernel/sched/fair.c
··· 5373 5373 static void check_enqueue_throttle(struct cfs_rq *cfs_rq); 5374 5374 static inline int cfs_rq_throttled(struct cfs_rq *cfs_rq); 5375 5375 5376 - static inline bool cfs_bandwidth_used(void); 5377 - 5378 5376 static void 5379 5377 requeue_delayed_entity(struct sched_entity *se); 5380 5378 ··· 6745 6747 #endif 6746 6748 6747 6749 #else /* CONFIG_CFS_BANDWIDTH */ 6748 - 6749 - static inline bool cfs_bandwidth_used(void) 6750 - { 6751 - return false; 6752 - } 6753 6750 6754 6751 static void account_cfs_rq_runtime(struct cfs_rq *cfs_rq, u64 delta_exec) {} 6755 6752 static bool check_cfs_rq_runtime(struct cfs_rq *cfs_rq) { return false; }