Skip to contentSkip to conversation

powernow-k8: Fix misleading variable naming

PATCH New Borislav Petkov 1 participant 1 message Jul 8, 2010 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powernow-k8: Fix misleading variable naming

rdmsr() takes the lower 32 bits as a second argument and the high 32 as a third. Fix the names accordingly since they were swapped.

There should be no functionality change resulting from this patch.

---
 arch/x86/kernel/cpu/cpufreq/powernow-k8.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/kernel/cpu/cpufreq/powernow-k8.c +2 -2
index 3e90cce..2258202 100644
@@ -910,8 +910,8 @@ static int fill_powernow_table_pstate(struct powernow_k8_data *data,
 {
 	int i;
 	u32 hi = 0, lo = 0;
-	rdmsr(MSR_PSTATE_CUR_LIMIT, hi, lo);
-	data->max_hw_pstate = (hi & HW_PSTATE_MAX_MASK) >> HW_PSTATE_MAX_SHIFT;
+	rdmsr(MSR_PSTATE_CUR_LIMIT, lo, hi);
+	data->max_hw_pstate = (lo & HW_PSTATE_MAX_MASK) >> HW_PSTATE_MAX_SHIFT;
 
 	for (i = 0; i < data->acpi_data.state_count; i++) {
 		u32 index;
Signature · 12 lines
1.7.1


-- 
Regards/Gruss,
Boris.

Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach
General Managers: Alberto Bozzo, Andrew Bowd
Registration: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632