Skip to contentSkip to conversation

sparc: fix warning in userspace header traps.h

PATCH Applied Sam Ravnborg 2 participants 2 messages Jan 1, 2009 – Jan 3, 2009 SPARC + UltraSPARC (sparc/sparc64)

lore
Share & tools
lore
#0 lore raw

PATCH 3/4 sparc: fix warning in userspace header traps.h

Fix following warning:
traps.h:23: extern's make no sense in userspace

Add an ifdef __KERNEL__ block that cover the extern definition and a few related things that neither is for userspace.

---
 arch/sparc/include/asm/traps.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/sparc/include/asm/traps.h +2 -2
index bebdbf8..4becd66 100644
@@ -10,7 +10,7 @@
 #define NUM_SPARC_TRAPS  255
 
 #ifndef __ASSEMBLY__
-
+#ifdef __KERNEL__
 /* This is for V8 compliant Sparc CPUS */
 struct tt_entry {
 	unsigned long inst_one;
@@ -29,7 +29,7 @@ static inline unsigned long get_tbr(void)
 	__asm__ __volatile__("rd %%tbr, %0\n\t" : "=r" (tbr));
 	return tbr;
 }
-
+#endif /* (__KERNEL__) */
 #endif /* !(__ASSEMBLY__) */
 
 /* For patching the trap table at boot time, we need to know how to
Signature · 1 line
1.6.0.2.GIT
maintainer Applied
#1 lore raw

From: Sam Ravnborg <[email protected]>
Date: Thu, 1 Jan 2009 23:40:29 +0100

Quoted 8 lines

Fix following warning:
traps.h:23: extern's make no sense in userspace

Add an ifdef __KERNEL__ block that cover the extern definition and a few related things that neither is for userspace.

Applied.