Skip to contentSkip to conversation

cpufreq: scpi-cpufreq: signedness bug in scpi_get_dvfs_info()

PATCH In review Dan Carpenter 3 participants 4 messages Oct 22, 2015 – Nov 26, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cpufreq: scpi-cpufreq: signedness bug in scpi_get_dvfs_info()

The "domain" variable needs to be signed for the error handling to work.

Fixes 8def31034d03 ('cpufreq: arm_big_little: add SCPI interface driver')
drivers/cpufreq/scpi-cpufreq.c +1 -1
index 2c3b16f..de5e89b 100644
@@ -31,7 +31,7 @@ static struct scpi_ops *scpi_ops;
 
 static struct scpi_dvfs_info *scpi_get_dvfs_info(struct device *cpu_dev)
 {
-	u8 domain = topology_physical_package_id(cpu_dev->id);
+	int domain = topology_physical_package_id(cpu_dev->id);
 
 	if (domain < 0)
 		return ERR_PTR(-EINVAL);
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Dan Carpenter

The "domain" variable needs to be signed for the error handling to work.

Fixes 8def31034d03 ('cpufreq: arm_big_little: add SCPI interface driver')
drivers/cpufreq/scpi-cpufreq.c +0 -0
index 2c3b16f..de5e89b 100644

drivers/cpufreq/scpi-cpufreq.c static struct scpi_ops *scpi_ops; · line 37

Quoted 8 lines
drivers/cpufreq/scpi-cpufreq.c +1 -1
@@ -31,7 +31,7 @@ static struct scpi_ops *scpi_ops;
 
 static struct scpi_dvfs_info *scpi_get_dvfs_info(struct device *cpu_dev)
 {
-	u8 domain = topology_physical_package_id(cpu_dev->id);
+	int domain = topology_physical_package_id(cpu_dev->id);
 
 	if (domain < 0)
 		return ERR_PTR(-EINVAL);
Signature · 1 line
viresh
#3 lore raw

Hi Rafael,

Quoted 7 lines · Sudeep Holla
Quoted 4 lines · Dan Carpenter

The "domain" variable needs to be signed for the error handling to work.

Quoted 7 lines
Quoted 3 lines
Fixes 8def31034d03 ('cpufreq: arm_big_little: add SCPI interface

driver') Signed-off-by: Dan Carpenter <[email protected]>

Thanks for the fix

Can you pick this up for your next -rc fixes ?

Regards,
Sudeep