diff mbox series

thermal/cpufreq: increment i in cpufreq_get_requested_power()

Message ID a7c1fe73-b40e-437c-8ccb-7b3baad04df7@moroto.mountain
State New
Headers show
Series thermal/cpufreq: increment i in cpufreq_get_requested_power() | expand

Commit Message

Dan Carpenter May 4, 2024, 11:25 a.m. UTC
We accidentally deleted the "i++" as part of a cleanup.  Restore it.

Fixes: 3f7ced7ac9af ("drivers/thermal/cpufreq_cooling : Refactor thermal_power_cpu_get_power tracing")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
This is based on static analysis and not tested.

 drivers/thermal/cpufreq_cooling.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Dan Carpenter May 6, 2024, 11:26 a.m. UTC | #1
On Mon, May 06, 2024 at 10:41:52AM +0100, Lukasz Luba wrote:
> Would you agree that I will keep you as 'Reported-by' and send a
> separate patch to change that !SMP code completely in that
> get_load() function and get rid of the 'cpu_idx' argument?

Yes, please.

regards,
dan carpenter
diff mbox series

Patch

diff --git a/drivers/thermal/cpufreq_cooling.c b/drivers/thermal/cpufreq_cooling.c
index 280071be30b1..a074192896de 100644
--- a/drivers/thermal/cpufreq_cooling.c
+++ b/drivers/thermal/cpufreq_cooling.c
@@ -249,6 +249,7 @@  static int cpufreq_get_requested_power(struct thermal_cooling_device *cdev,
 			load = 0;
 
 		total_load += load;
+		i++;
 	}
 
 	cpufreq_cdev->last_load = total_load;