It will be squashed
Signed-off-by: Lukasz Luba l.luba@partner.samsung.com --- kernel/sched/power.c | 54 +++++++++++++++++++------------------------- kernel/sched/power.h | 2 +- 2 files changed, 24 insertions(+), 32 deletions(-)
diff --git a/kernel/sched/power.c b/kernel/sched/power.c index d2ba44befaae..327f49a670d2 100644 --- a/kernel/sched/power.c +++ b/kernel/sched/power.c @@ -122,12 +122,6 @@ int sched_power_cpu_reinit_weight(int cpu, int weight) } EXPORT_SYMBOL_GPL(sched_power_cpu_reinit_weight);
-static int vidle_setup(int cpu, int rate, int period) -{ - - return 0; -} -
//////////////////////////////////////////////////////////////
@@ -160,8 +154,6 @@ static void sched_power_idle_stop(struct cpu_power *cpower) static int sched_power_idle_play(struct cpu_power *cpower, unsigned int period, unsigned int idle) { - unsigned int run; - if (period <= idle) return -EINVAL;
@@ -187,13 +179,13 @@ static int sched_power_reweight_cluster(int cpu, struct cpumask *cpus, unsigned int capacity, unsigned int period, int flags) { - int ret, i; - struct cpu_power *cpower = NULL; - int opp_curr_state, opp_curr_cost; - int opp_next_state, opp_next_cost; - u64 cluster_udget; - u64 total_weight = 0; - + /* int ret, i; */ + /* struct cpu_power *cpower = NULL; */ + /* int opp_curr_state, opp_curr_cost; */ + /* int opp_next_state, opp_next_cost; */ + /* u64 cluster_udget; */ + /* u64 total_weight = 0; */ + /* */ /* opp_next_state = get_opp_for_capacity(cpu, capacity); */ /* opp_next_cost = get_opp_cost(cpu, opp_next_state); */ /* */ @@ -279,8 +271,6 @@ static void sched_power_update_cpu_weight(struct cpu_power *cpower, int cpu, int weight, int flags, int time) { - struct sched_power *sp; - raw_spin_lock(&cpower->update_lock); cpower->req.weight = weight; cpower->req.cpu = cpu; @@ -400,7 +390,7 @@ static int sched_power_idle_init(struct sched_power *sp) { struct idle_inject_device *ii_dev; struct cpumask *cpus; - int i, last_cpu; + int i, last_cpu = 0; struct cpu_power *cpower;
@@ -413,7 +403,6 @@ static int sched_power_idle_init(struct sched_power *sp)
ii_dev = idle_inject_register(cpus); if (IS_ERR_OR_NULL(ii_dev)) { - last_cpu; goto cleanup; }
@@ -423,6 +412,7 @@ static int sched_power_idle_init(struct sched_power *sp) raw_spin_unlock(&cpower->update_lock);
cpumask_clear_cpu(i, cpus); + last_cpu = i; }
kfree(cpus); @@ -446,8 +436,7 @@ static int sched_power_idle_init(struct sched_power *sp)
static void sched_power_idle_unregister(struct sched_power *sp) { - struct idle_inject_device *ii_dev; - int i, last_cpu; + int i; struct cpu_power *cpower;
for_each_possible_cpu(i) { @@ -539,7 +528,7 @@ static u64 calc_power_budget(struct thermal_zone_device *tz, int desire_temp)
power_budget = temp_diff;
- power_budget = max(0, power_budget); + power_budget = max(0LL, power_budget);
return power_budget; } @@ -578,10 +567,11 @@ static int throttle_single_cdev(struct _thermal_zone *zone) return 0; }
+ static int sched_power_gov_throttle(struct thermal_zone_device *tz, int trip) { - struct thermal_cooling_device *cdev; - struct thermal_instance *inst; + struct thermal_cooling_device *cdev = NULL; + struct thermal_instance *inst = NULL; u32 dev_power; struct _thermal_zone *zone; int ret; @@ -658,7 +648,7 @@ static int sched_power_gov_bind(struct thermal_zone_device *tz) { struct thermal_instance *inst; struct _thermal_zone *zone; - struct _cooling_dev *cooling, *prev_cooling; + struct _cooling_dev *cooling, *prev_cooling = NULL; struct _cooling_instance *_inst, *tmp; struct thermal_cooling_device *cdev; int i = 0; @@ -735,12 +725,14 @@ static int sched_power_gov_bind(struct thermal_zone_device *tz) return 0;
cleanup: - list_for_each_entry_reverse(cooling, &prev_cooling->node, node) { - if (i-- == 0) - break; - list_del(&prev_cooling->node); - cleanup_percpu_cooling_dev(prev_cooling); - prev_cooling = cooling; + if (prev_cooling) { + list_for_each_entry_reverse(cooling, &prev_cooling->node, node) { + if (i-- == 0) + break; + list_del(&prev_cooling->node); + cleanup_percpu_cooling_dev(prev_cooling); + prev_cooling = cooling; + } } mutex_unlock(&cdev_list_lock);
diff --git a/kernel/sched/power.h b/kernel/sched/power.h index da969b9bc30f..7fafaa9f6609 100644 --- a/kernel/sched/power.h +++ b/kernel/sched/power.h @@ -36,7 +36,7 @@ struct power_request { unsigned int weight; int cpu; u64 time; - int flags + int flags; };
struct _cooling_dev;