Skip to content

Commit a76328d

Browse files
valschneiderPeter Zijlstra
authored andcommitted
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 <[email protected]> Signed-off-by: Valentin Schneider <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 3a181f2 commit a76328d

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

kernel/sched/fair.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5373,8 +5373,6 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags)
53735373
static void check_enqueue_throttle(struct cfs_rq *cfs_rq);
53745374
static inline int cfs_rq_throttled(struct cfs_rq *cfs_rq);
53755375

5376-
static inline bool cfs_bandwidth_used(void);
5377-
53785376
static void
53795377
requeue_delayed_entity(struct sched_entity *se);
53805378

@@ -6748,11 +6746,6 @@ static void sched_fair_update_stop_tick(struct rq *rq, struct task_struct *p)
67486746

67496747
#else /* CONFIG_CFS_BANDWIDTH */
67506748

6751-
static inline bool cfs_bandwidth_used(void)
6752-
{
6753-
return false;
6754-
}
6755-
67566749
static void account_cfs_rq_runtime(struct cfs_rq *cfs_rq, u64 delta_exec) {}
67576750
static bool check_cfs_rq_runtime(struct cfs_rq *cfs_rq) { return false; }
67586751
static void check_enqueue_throttle(struct cfs_rq *cfs_rq) {}

0 commit comments

Comments
 (0)