sched/power: change 'weight' type allowing to decrese value
authorLukasz Luba <l.luba@partner.samsung.com>
Tue, 30 Oct 2018 13:24:23 +0000 (14:24 +0100)
committerLukasz Luba <l.luba@partner.samsung.com>
Fri, 17 May 2019 07:15:42 +0000 (09:15 +0200)
Signed-off-by: Lukasz Luba <l.luba@partner.samsung.com>
kernel/sched/power.c
kernel/sched/sched.h

index c9893c86efe6856df0c7c953900bde8c6955c020..89e447d442cdb08e79b56de2b568d13d6a5d62a8 100644 (file)
@@ -23,7 +23,7 @@ DEFINE_PER_CPU(struct update_sched_power *, update_cpu_power);
 static struct sched_power sched_power;
 
 void sched_power_set_update_func(int cpu, struct update_sched_power *update,
-               void (*fn)(struct update_sched_power *, int, unsigned int, int,
+               void (*fn)(struct update_sched_power *, int, int, int,
                           int))
 {
 
@@ -274,7 +274,7 @@ static void sched_power_irq_work(struct irq_work *irq_work)
 }
 
 static void sched_power_update(struct update_sched_power *update, int cpu,
-                              unsigned int weight, int flags, int time)
+                              int weight, int flags, int time)
 {
        struct cpu_power *cpower = container_of(update, struct cpu_power,
                                                   update_power);
index 725e0c19ae9699f38e53caaaad730164dd24b9bd..ebaf42e81afae9d93b510379033442868d5ffdb9 100644 (file)
@@ -2249,12 +2249,12 @@ unsigned long scale_irq_capacity(unsigned long util, unsigned long irq, unsigned
 #define SCHED_POWER_CLUSTER_REQ 0x2
 #ifdef CONFIG_THERMAL
 struct update_sched_power {
-       void (*func)(struct update_sched_power *, int, unsigned int, int, int);
+       void (*func)(struct update_sched_power *, int, int, int, int);
 };
 DECLARE_PER_CPU(struct update_sched_power *, update_cpu_power);
 
-static inline void sched_power_change_cpu_weight(int cpu, unsigned long weight,
-                                                int flags)
+static inline
+void sched_power_change_cpu_weight(int cpu, int weight, int flags)
 {
        struct update_sched_power *update;
        u64 time = sched_clock();
@@ -2266,15 +2266,16 @@ static inline void sched_power_change_cpu_weight(int cpu, unsigned long weight,
 }
 
 static inline
-void sched_power_change_cluster_weight(int cpu, unsigned long weight, int flags)
+void sched_power_change_cluster_weight(int cpu, int weight, int flags)
 {
        sched_power_change_cpu_weight(cpu, weight, flags |
                                      SCHED_POWER_CLUSTER_REQ);
 }
 #else
-static inline void sched_power_change_cpu_weight(int cpu, unsigned int weight,
-                                                int flags) {}
 static inline
-void sched_power_change_cluster_weight(int cpu, unsigned int weight, int flags)
+void sched_power_change_cpu_weight(int cpu, int weight, int flags) {}
+
+static inline
+void sched_power_change_cluster_weight(int cpu, int weight, int flags)
 {}
 #endif /* CONFIG_THERMAL */