LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 1/3] x86: sparse warning in cpufreq/powernow-k8.c
@ 2008-02-07 0:07 Harvey Harrison
[not found] ` <20080207043547.GA10078@codemonkey.org.uk>
0 siblings, 1 reply; 2+ messages in thread
From: Harvey Harrison @ 2008-02-07 0:07 UTC (permalink / raw)
To: Ingo Molnar; +Cc: H. Peter Anvin, Thomas Gleixner, LKML
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-02-07 7:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-07 0:07 [PATCH 1/3] x86: sparse warning in cpufreq/powernow-k8.c Harvey Harrison
[not found] ` <20080207043547.GA10078@codemonkey.org.uk>
2008-02-07 7:18 ` Harvey Harrison
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).