[PATCH] sched/fair: remove cfs_bandwidth_used() when !CONFIG_CFS_BANDWIDTH

Miaohe Lin posted 1 patch 2 years, 8 months ago
kernel/sched/fair.c | 7 -------
1 file changed, 7 deletions(-)
[PATCH] sched/fair: remove cfs_bandwidth_used() when !CONFIG_CFS_BANDWIDTH
Posted by Miaohe Lin 2 years, 8 months ago
When CONFIG_CFS_BANDWIDTH is disabled, cfs_bandwidth_used() is not used.
Remove it. Also remove unneeded cfs_bandwidth_used() forward declaration.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
 kernel/sched/fair.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 1b626310cf8c..771bc9f1efb3 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -4781,8 +4781,6 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial)
 
 static void check_enqueue_throttle(struct cfs_rq *cfs_rq);
 
-static inline bool cfs_bandwidth_used(void);
-
 /*
  * MIGRATION
  *
@@ -6134,11 +6132,6 @@ static void __maybe_unused unthrottle_offline_cfs_rqs(struct rq *rq)
 
 #else /* CONFIG_CFS_BANDWIDTH */
 
-static inline bool cfs_bandwidth_used(void)
-{
-	return false;
-}
-
 static void account_cfs_rq_runtime(struct cfs_rq *cfs_rq, u64 delta_exec) {}
 static bool check_cfs_rq_runtime(struct cfs_rq *cfs_rq) { return false; }
 static void check_enqueue_throttle(struct cfs_rq *cfs_rq) {}
-- 
2.27.0