[PATCH 1/3] x86: sparse warning in cpufreq/powernow-k8.c
From: Harvey Harrison
Date: Wed Feb 06 2008 - 19:38:15 EST
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@xxxxxxxxx>
---
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/