* [PATCH] make powerpc BUG_ON() OK with pointers and bitwise
@ 2007-07-26 16:35 Al Viro
2007-07-26 23:30 ` Paul Mackerras
0 siblings, 1 reply; 2+ messages in thread
From: Al Viro @ 2007-07-26 16:35 UTC (permalink / raw)
To: torvalds; +Cc: linuxppc-dev, linux-kernel
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 <viro@zeniv.linux.org.uk>
---
include/asm-powerpc/bug.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/asm-powerpc/bug.h b/include/asm-powerpc/bug.h
index f6fa394..a248b8b 100644
--- a/include/asm-powerpc/bug.h
+++ b/include/asm-powerpc/bug.h
@@ -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)
--
1.5.3.GIT
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] make powerpc BUG_ON() OK with pointers and bitwise
2007-07-26 16:35 [PATCH] make powerpc BUG_ON() OK with pointers and bitwise Al Viro
@ 2007-07-26 23:30 ` Paul Mackerras
0 siblings, 0 replies; 2+ messages in thread
From: Paul Mackerras @ 2007-07-26 23:30 UTC (permalink / raw)
To: Al Viro; +Cc: linuxppc-dev, torvalds, linux-kernel
Al Viro writes:
> 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.
> 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.
> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Paul Mackerras <paulus@samba.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-07-26 23:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-26 16:35 [PATCH] make powerpc BUG_ON() OK with pointers and bitwise Al Viro
2007-07-26 23:30 ` Paul Mackerras
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).