sched/fair: remove cfs_bandwidth_used() when !CONFIG_CFS_BANDWIDTH

Message ID 20230606130420.479325-1-linmiaohe@huawei.com
State New
Headers
Series sched/fair: remove cfs_bandwidth_used() when !CONFIG_CFS_BANDWIDTH |

Commit Message

Miaohe Lin June 6, 2023, 1:04 p.m. UTC
  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(-)
  

Patch

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) {}