Commit f2cad7a8 authored by Al Viro's avatar Al Viro Committed by Paul Mackerras

[PATCH] ppc bug.h namespace pollution

DATA_TYPE is really not a good thing to put into header that
gets included all over the tree...

Just make the cast always (long) and get rid of DATA_TYPE altogether.
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 2ff2ae7a
...@@ -15,12 +15,10 @@ ...@@ -15,12 +15,10 @@
#define BUG_TABLE_ENTRY(label, line, file, func) \ #define BUG_TABLE_ENTRY(label, line, file, func) \
".llong " #label ", " #line ", " #file ", " #func "\n" ".llong " #label ", " #line ", " #file ", " #func "\n"
#define TRAP_OP(ra, rb) "1: tdnei " #ra ", " #rb "\n" #define TRAP_OP(ra, rb) "1: tdnei " #ra ", " #rb "\n"
#define DATA_TYPE long long
#else #else
#define BUG_TABLE_ENTRY(label, line, file, func) \ #define BUG_TABLE_ENTRY(label, line, file, func) \
".long " #label ", " #line ", " #file ", " #func "\n" ".long " #label ", " #line ", " #file ", " #func "\n"
#define TRAP_OP(ra, rb) "1: twnei " #ra ", " #rb "\n" #define TRAP_OP(ra, rb) "1: twnei " #ra ", " #rb "\n"
#define DATA_TYPE int
#endif /* __powerpc64__ */ #endif /* __powerpc64__ */
struct bug_entry { struct bug_entry {
...@@ -55,7 +53,7 @@ struct bug_entry *find_bug(unsigned long bugaddr); ...@@ -55,7 +53,7 @@ struct bug_entry *find_bug(unsigned long bugaddr);
".section __bug_table,\"a\"\n\t" \ ".section __bug_table,\"a\"\n\t" \
BUG_TABLE_ENTRY(1b,%1,%2,%3) \ BUG_TABLE_ENTRY(1b,%1,%2,%3) \
".previous" \ ".previous" \
: : "r" ((DATA_TYPE)(x)), "i" (__LINE__), \ : : "r" ((long)(x)), "i" (__LINE__), \
"i" (__FILE__), "i" (__FUNCTION__)); \ "i" (__FILE__), "i" (__FUNCTION__)); \
} while (0) } while (0)
...@@ -65,7 +63,7 @@ struct bug_entry *find_bug(unsigned long bugaddr); ...@@ -65,7 +63,7 @@ struct bug_entry *find_bug(unsigned long bugaddr);
".section __bug_table,\"a\"\n\t" \ ".section __bug_table,\"a\"\n\t" \
BUG_TABLE_ENTRY(1b,%1,%2,%3) \ BUG_TABLE_ENTRY(1b,%1,%2,%3) \
".previous" \ ".previous" \
: : "r" ((DATA_TYPE)(x)), \ : : "r" ((long)(x)), \
"i" (__LINE__ + BUG_WARNING_TRAP), \ "i" (__LINE__ + BUG_WARNING_TRAP), \
"i" (__FILE__), "i" (__FUNCTION__)); \ "i" (__FILE__), "i" (__FUNCTION__)); \
} while (0) } while (0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment