lkml.org 
[lkml]   [2008]   [Feb]   [6]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 1/3] x86: sparse warning in cpufreq/powernow-k8.c
FromHarvey Harrison <>
DateWed, 06 Feb 2008 16:07:47 -0800
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



\
 
 \ /
  Last update: 2008-02-07 01:41    [from the cache]
©2003-2008