aboutsummaryrefslogtreecommitdiff
path: root/scripts/patch-kernel
diff options
context:
space:
mode:
authorLinus Torvalds <[email protected]>2007-07-31 21:12:07 -0700
committerLinus Torvalds <[email protected]>2007-07-31 21:12:07 -0700
commit8d4fbcfbe0a4bfc73e7f0297c59ae514e1f1436f (patch)
treef4fe8e2028620b8aeb298c78ee5dc9d6df07e708 /scripts/patch-kernel
parent2f63251ed0a803ddbe7bf2577b69d467aa872f68 (diff)
Fix WARN_ON() on bitfield ops
Alexey Dobriyan noticed that the new WARN_ON() semantics that were introduced by commit 684f978347deb42d180373ac4c427f82ef963171 (to also return the value to be warned on) didn't compile when given a bitfield, because the typeof doesn't work for bitfields. So instead of the typeof trick, use an "int" variable together with a "!!(x)" expression, as suggested by Al Viro. To make matters more interesting, Paul Mackerras points out that that is sub-optimal on Power, but the old asm-coded comparison seems to be buggy anyway on 32-bit Power if the conditional was 64-bit, so I think there are more problems there. Regardless, the new WARN_ON() semantics may have been a bad idea. But this at least avoids the more serious complications. Cc: Alexey Dobriyan <[email protected]> Cc: Herbert Xu <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Al Viro <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'scripts/patch-kernel')
0 files changed, 0 insertions, 0 deletions