make powerpc BUG_ON() OK with pointers and bitwise
PATCH 1/1 make powerpc BUG_ON() OK with pointers and bitwise
Since powerpc insists on printing the _value_ of condition and on casting it to long... At least let's make it a force-cast.
Signed-off-by Al Viro <[email protected]>
--- include/asm-powerpc/bug.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
include/asm-powerpc/bug.h +1 -1
@@ -79,7 +79,7 @@ _EMIT_BUG_ENTRY \ : : "i" (__FILE__), "i" (__LINE__), "i" (0), \"i" (sizeof (struct bug_entry )), \ - "r" ((long)(x))); \ + "r" ((__force long)(x))); \ } \ }while (0 )
Signature · 1 line
1.5.3.GIT
Quoted 1 line · Al Viro
Since powerpc insists on printing the _value_ of condition
We don't _print_ the value of the condition, we give it to a conditional-trap instruction which will trap if it is non-zero.
Quoted 1 line
and on casting it to long... At least let's make it a force-cast.
The long cast is to make sure it's sign-extended to the full register width. Adding __force looks fine.
Quoted 1 line
Signed-off-by Al Viro <[email protected]>
Acked-by Paul Mackerras <[email protected]>