linux/include/asm-generic
Linus Torvalds 8d4fbcfbe0 Fix WARN_ON() on bitfield ops
Alexey Dobriyan noticed that the new WARN_ON() semantics that were
introduced by commit 684f978347 (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 <adobriyan@sw.ru>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Al Viro <viro@ftp.linux.org.uk>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2007-07-31 21:12:07 -07:00
..
bitops
4level-fixup.h
Kbuild
Kbuild.asm
atomic.h
audit_change_attr.h
audit_dir_write.h
audit_read.h
audit_signal.h
audit_write.h
bitops.h
bug.h Fix WARN_ON() on bitfield ops 2007-07-31 21:12:07 -07:00
cputime.h
device.h
div64.h
dma-mapping-broken.h
dma-mapping.h
emergency-restart.h
errno-base.h
errno.h
fcntl.h
futex.h
gpio.h
ide_iops.h
ioctl.h
iomap.h
ipc.h
irq_regs.h
kdebug.h
libata-portmap.h
local.h
memory_model.h
mm_hooks.h
mman.h
mutex-dec.h
mutex-null.h
mutex-xchg.h
page.h
pci-dma-compat.h
pci.h
percpu.h define new percpu interface for shared data 2007-07-19 10:04:44 -07:00
pgtable-nopmd.h
pgtable-nopud.h
pgtable.h mm: remove ptep_test_and_clear_dirty and ptep_clear_flush_dirty 2007-07-17 10:22:59 -07:00
poll.h
resource.h
rtc.h
sections.h
siginfo.h
signal.h
statfs.h
termios.h
tlb.h
topology.h
uaccess.h
unaligned.h use __val in __get_unaligned 2007-07-31 15:39:42 -07:00
vmlinux.lds.h i386: Put allocated ELF notes in read-only data segment 2007-07-19 10:04:47 -07:00
xor.h