[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1202342867.5820.89.camel@brick>
Date: Wed, 06 Feb 2008 16:07:47 -0800
From: Harvey Harrison <harvey.harrison@...il.com>
To: Ingo Molnar <mingo@...e.hu>
Cc: "H. Peter Anvin" <hpa@...or.com>,
Thomas Gleixner <tglx@...utronix.de>,
LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH 1/3] x86: sparse warning in cpufreq/powernow-k8.c
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@...il.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists