mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] m68k: avoid pgprot_noncached redefinition
@ 2009-08-27 11:41 Heiko Carstens
  2009-08-27 12:18 ` Geert Uytterhoeven
  0 siblings, 1 reply; 3+ messages in thread
From: Heiko Carstens @ 2009-08-27 11:41 UTC (permalink / raw)
  To: Geert Uytterhoeven, Greg Ungerer, Andrew Morton; +Cc: linux-kernel

From: Heiko Carstens <heiko.carstens@de.ibm.com>

While compiling m68k with defconfig I get tons if these warnings:

/home2/heicarst/linux-2.6/arch/m68k/include/asm/pgtable_mm.h:148:1: warning: "pgprot_noncached" redefined
In file included from /home2/heicarst/linux-2.6/arch/m68k/include/asm/pgtable_mm.h:138,
 from /home2/heicarst/linux-2.6/arch/m68k/include/asm/pgtable.h:4,
 from include/linux/mm.h:38,
 from /home2/heicarst/linux-2.6/arch/m68k/include/asm/atarihw.h:134,
 from arch/m68k/atari/debug.c:20:
include/asm-generic/pgtable.h:133:1: warning: this is the location of the previous definition

Reason for this is that asm-generic/pgtable.h gets included in pgtable_mm.h
before pgprot_noncached gets defined.
So the check "#ifndef pgprot_noncached" in the generic header file is too early.
Solve this by including the generic header file after the arch define.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
---
 arch/m68k/include/asm/pgtable_mm.h |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: linux-2.6/arch/m68k/include/asm/pgtable_mm.h
===================================================================
--- linux-2.6.orig/arch/m68k/include/asm/pgtable_mm.h
+++ linux-2.6/arch/m68k/include/asm/pgtable_mm.h
@@ -135,7 +135,6 @@ static inline void update_mmu_cache(stru
 #endif
 
 #ifndef __ASSEMBLY__
-#include <asm-generic/pgtable.h>
 
 /*
  * Macro to mark a page protection value as "uncacheable".
@@ -154,6 +153,8 @@ static inline void update_mmu_cache(stru
 	    ? (__pgprot((pgprot_val(prot) & _CACHEMASK040) | _PAGE_NOCACHE_S))	\
 	    : (prot)))
 
+#include <asm-generic/pgtable.h>
+
 #endif /* !__ASSEMBLY__ */
 
 /*

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-08-27 12:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-27 11:41 [PATCH] m68k: avoid pgprot_noncached redefinition Heiko Carstens
2009-08-27 12:18 ` Geert Uytterhoeven
2009-08-27 12:38   ` Heiko Carstens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®