From ca35ac869e056368ea30d04126efd6902c53f13c Mon Sep 17 00:00:00 2001 From: Connor O'Brien Date: Mon, 15 Apr 2019 14:12:42 -0700 Subject: [PATCH] sched: delete unused & buggy function definitions None of these functions does what its name implies when CONFIG_SCHED_WALT=n. While all are currently unused, future patches could introduce subtle bugs by calling any of them from non WALT specific code. Delete the functions so it's obvious if new callers are added. Bug: 144961676 Test: build kernel Change-Id: Ib7552afb5668b48fe2ae56307016e98716e00e63 Signed-off-by: Connor O'Brien Signed-off-by: Jimmy Shiu --- kernel/sched/sched.h | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 8b7c99abebdb..ae681709f9cd 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -3144,7 +3144,6 @@ task_in_cum_window_demand(struct rq *rq, struct task_struct *p) } static inline bool hmp_capable(void) { return false; } -static inline bool is_max_capacity_cpu(int cpu) { return true; } static inline bool is_min_capacity_cpu(int cpu) { #ifdef CONFIG_SMP @@ -3157,16 +3156,6 @@ static inline bool is_min_capacity_cpu(int cpu) #endif } -static inline int -preferred_cluster(struct sched_cluster *cluster, struct task_struct *p) -{ - return -1; -} - -static inline struct sched_cluster *rq_cluster(struct rq *rq) -{ - return NULL; -} static inline bool is_asym_cap_cpu(int cpu) { return false; } @@ -3206,11 +3195,6 @@ static inline int update_preferred_cluster(struct related_thread_group *grp, static inline void add_new_task_to_grp(struct task_struct *new) {} -static inline int same_freq_domain(int src_cpu, int dst_cpu) -{ - return 1; -} - static inline int mark_reserved(int cpu) { return 0; @@ -3250,13 +3234,6 @@ static inline bool early_detection_notify(struct rq *rq, u64 wallclock) return 0; } -#ifdef CONFIG_SMP -static inline unsigned int power_cost(int cpu, u64 demand) -{ - return SCHED_CAPACITY_SCALE; -} -#endif - static inline void note_task_waking(struct task_struct *p, u64 wallclock) { } static inline bool walt_want_remote_wakeup(void) {