* [PATCH] x86: pageattr.c fix shadowed variable warning
@ 2008-03-05 6:05 Harvey Harrison
2008-03-05 7:07 ` Ingo Molnar
0 siblings, 1 reply; 3+ messages in thread
From: Harvey Harrison @ 2008-03-05 6:05 UTC (permalink / raw)
To: Linus Torvalds, Ingo Molnar; +Cc: Andrew Morton, LKML
irqs_disabled() uses flags internally, use _flags to avoid shadowing
code calling into this macro.
Introduced between 2.6.25-rc3 and -rc4
Fixes the sparse warning:
arch/x86/mm/pageattr.c:383:21: warning: symbol 'flags' shadows an earlier one
arch/x86/mm/pageattr.c:369:16: originally declared here
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
---
This was the only new sparse warning introduced between -rc3 and -rc4 on an
X86_32 allyesconfig.
include/linux/irqflags.h | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/linux/irqflags.h b/include/linux/irqflags.h
index 412e025..e600c4e 100644
--- a/include/linux/irqflags.h
+++ b/include/linux/irqflags.h
@@ -84,10 +84,10 @@
#define irqs_disabled() \
({ \
- unsigned long flags; \
+ unsigned long _flags; \
\
- raw_local_save_flags(flags); \
- raw_irqs_disabled_flags(flags); \
+ raw_local_save_flags(_flags); \
+ raw_irqs_disabled_flags(_flags); \
})
#define irqs_disabled_flags(flags) raw_irqs_disabled_flags(flags)
--
1.5.4.GIT
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] x86: pageattr.c fix shadowed variable warning
2008-03-05 6:05 [PATCH] x86: pageattr.c fix shadowed variable warning Harvey Harrison
@ 2008-03-05 7:07 ` Ingo Molnar
2008-03-05 7:12 ` Harvey Harrison
0 siblings, 1 reply; 3+ messages in thread
From: Ingo Molnar @ 2008-03-05 7:07 UTC (permalink / raw)
To: Harvey Harrison; +Cc: Linus Torvalds, Andrew Morton, LKML
* Harvey Harrison <harvey.harrison@gmail.com> wrote:
> irqs_disabled() uses flags internally, use _flags to avoid shadowing
> code calling into this macro.
thanks Harvey, applied.
Ingo
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] x86: pageattr.c fix shadowed variable warning
2008-03-05 7:07 ` Ingo Molnar
@ 2008-03-05 7:12 ` Harvey Harrison
0 siblings, 0 replies; 3+ messages in thread
From: Harvey Harrison @ 2008-03-05 7:12 UTC (permalink / raw)
To: Ingo Molnar; +Cc: Linus Torvalds, Andrew Morton, LKML
On Wed, 2008-03-05 at 08:07 +0100, Ingo Molnar wrote:
> * Harvey Harrison <harvey.harrison@gmail.com> wrote:
>
> > irqs_disabled() uses flags internally, use _flags to avoid shadowing
> > code calling into this macro.
>
> thanks Harvey, applied.
Sorry I gave that patch such a poor name...although the warning shows in
pageattr.c, the patch itself is for include/linux/irqflags.h
Harvey
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-03-05 7:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-05 6:05 [PATCH] x86: pageattr.c fix shadowed variable warning Harvey Harrison
2008-03-05 7:07 ` Ingo Molnar
2008-03-05 7:12 ` Harvey Harrison
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox