Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Sam Ravnborg and committed by
David S. Miller
220483fe fffeeb41

+2 -2
+2 -2
arch/sparc/include/asm/traps.h
··· 10 10 #define NUM_SPARC_TRAPS 255 11 11 12 12 #ifndef __ASSEMBLY__ 13 - 13 + #ifdef __KERNEL__ 14 14 /* This is for V8 compliant Sparc CPUS */ 15 15 struct tt_entry { 16 16 unsigned long inst_one; ··· 29 29 __asm__ __volatile__("rd %%tbr, %0\n\t" : "=r" (tbr)); 30 30 return tbr; 31 31 } 32 - 32 + #endif /* (__KERNEL__) */ 33 33 #endif /* !(__ASSEMBLY__) */ 34 34 35 35 /* For patching the trap table at boot time, we need to know how to