From c834707bc94e4460baf5ccf81656e9bde47c9689 Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Wed, 6 Jul 2016 16:59:41 +0100 Subject: [PATCH] xen: credit2: kill useless helper function choose_cpu In fact, it has the same signature of csched2_cpu_pick, which also is its unique caller. Signed-off-by: Dario Faggioli Reviewed-by: George Dunlap --- xen/common/sched_credit2.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/xen/common/sched_credit2.c b/xen/common/sched_credit2.c index 04c957df34..d07806f28a 100644 --- a/xen/common/sched_credit2.c +++ b/xen/common/sched_credit2.c @@ -321,7 +321,7 @@ struct csched2_dom { /* * When a hard affinity change occurs, we may not be able to check some * (any!) of the other runqueues, when looking for the best new processor - * for svc (as trylock-s in choose_cpu() can fail). If that happens, we + * for svc (as trylock-s in csched2_cpu_pick() can fail). If that happens, we * pick, in order of decreasing preference: * - svc's current pcpu; * - another pcpu from svc's current runq; @@ -1116,7 +1116,7 @@ csched2_context_saved(const struct scheduler *ops, struct vcpu *vc) #define MAX_LOAD (1ULL<<60); static int -choose_cpu(const struct scheduler *ops, struct vcpu *vc) +csched2_cpu_pick(const struct scheduler *ops, struct vcpu *vc) { struct csched2_private *prv = CSCHED2_PRIV(ops); int i, min_rqi = -1, new_cpu; @@ -1490,16 +1490,6 @@ out: return; } -static int -csched2_cpu_pick(const struct scheduler *ops, struct vcpu *vc) -{ - int new_cpu; - - new_cpu = choose_cpu(ops, vc); - - return new_cpu; -} - static void csched2_vcpu_migrate( const struct scheduler *ops, struct vcpu *vc, unsigned int new_cpu) -- 2.30.2