]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
sparc: fix warning in userspace header traps.h
authorSam Ravnborg <sam@ravnborg.org>
Sat, 3 Jan 2009 05:32:34 +0000 (21:32 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 3 Jan 2009 05:32:34 +0000 (21:32 -0800)
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.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/include/asm/traps.h

index bebdbf8f43a87e59d48222606daf2d41bbc84549..4becd66e04f24517ee726a0100f38188de4d80d3 100644 (file)
@@ -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