Skip to content

Commit

Permalink
[PATCH] git-powerpc: WARN was a dumb idea
Browse files Browse the repository at this point in the history
There are at least 14 different implementations of WARN() in the tree already.
The build fails all over the place.

Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Andrew Morton authored and Paul Mackerras committed Mar 28, 2006
1 parent 4d177fb commit 872345b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions include/asm-powerpc/bug.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ struct bug_entry *find_bug(unsigned long bugaddr);
__asm__ __volatile__( \
"1: twi 31,0,0\n" \
".section __bug_table,\"a\"\n" \
"\t"PPC_LONG" 1b,%0,%1,%2\n" \
"\t"PPC_LONG" 1b,%0,%1,%2\n" \
".previous" \
: : "i" (__LINE__), "i" (__FILE__), "i" (__FUNCTION__)); \
} while (0)
Expand All @@ -53,14 +53,14 @@ struct bug_entry *find_bug(unsigned long bugaddr);
__asm__ __volatile__( \
"1: "PPC_TLNEI" %0,0\n" \
".section __bug_table,\"a\"\n" \
"\t"PPC_LONG" 1b,%1,%2,%3\n" \
"\t"PPC_LONG" 1b,%1,%2,%3\n" \
".previous" \
: : "r" ((long)(x)), "i" (__LINE__), \
"i" (__FILE__), "i" (__FUNCTION__)); \
} \
} while (0)

#define WARN() do { \
#define __WARN() do { \
__asm__ __volatile__( \
"1: twi 31,0,0\n" \
".section __bug_table,\"a\"\n" \
Expand All @@ -73,12 +73,12 @@ struct bug_entry *find_bug(unsigned long bugaddr);
#define WARN_ON(x) do { \
if (__builtin_constant_p(x)) { \
if (x) \
WARN(); \
__WARN(); \
} else { \
__asm__ __volatile__( \
"1: "PPC_TLNEI" %0,0\n" \
".section __bug_table,\"a\"\n" \
"\t"PPC_LONG" 1b,%1,%2,%3\n" \
"\t"PPC_LONG" 1b,%1,%2,%3\n" \
".previous" \
: : "r" ((long)(x)), \
"i" (__LINE__ + BUG_WARNING_TRAP), \
Expand Down

0 comments on commit 872345b

Please sign in to comment.