[PATCH 1/3] x86: sparse warning in cpufreq/powernow-k8.c

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Ingo Molnar <mingo@...>
Cc: H. Peter Anvin <hpa@...>, Thomas Gleixner <tglx@...>, LKML <linux-kernel@...>
Date: Wednesday, February 6, 2008 - 8:07 pm

Nested per_cpu accessors will shadow the internal __ptr variable.  Use
a temporary first_core variable.

arch/x86/kernel/cpu/cpufreq/powernow-k8.c:1239:9: warning: symbol '__ptr' shadows an earlier one
arch/x86/kernel/cpu/cpufreq/powernow-k8.c:1239:9: originally declared here

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
---
 arch/x86/kernel/cpu/cpufreq/powernow-k8.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
index 5affe91..e64eee0 100644
--- a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
+++ b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
@@ -1234,9 +1234,10 @@ static unsigned int powernowk8_get (unsigned int cpu)
 {
 	struct powernow_k8_data *data;
 	cpumask_t oldmask = current->cpus_allowed;
+	unsigned int first_core = first_cpu(per_cpu(cpu_core_map, cpu));
 	unsigned int khz = 0;
 
-	data = per_cpu(powernow_data, first_cpu(per_cpu(cpu_core_map, cpu)));
+	data = per_cpu(powernow_data, first_core);
 
 	if (!data)
 		return -EINVAL;
-- 
1.5.4.1189.g38fd5


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/3] x86: sparse warning in cpufreq/powernow-k8.c, Harvey Harrison, (Wed Feb 6, 8:07 pm)