android_kernel_xiaomi_sm8350/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 sched: simplify sched_find_first_bit() 2007-07-09 18:52:00 +02:00
4level-fixup.h
atomic.h atomic.h: atomic_add_unless as inline. Remove system.h atomic.h circular dependency 2007-05-08 11:15:20 -07:00
audit_change_attr.h
audit_dir_write.h
audit_read.h
audit_signal.h [PATCH] add SIGNAL syscall class (v3) 2007-05-11 05:38:25 -04:00
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 [NET]: div64_64 consolidate (rev3) 2007-04-25 22:23:33 -07:00
dma-mapping-broken.h dma-mapping: prevent dma dependent code from linking on !HAS_DMA archs 2007-07-16 09:05:45 -07:00
dma-mapping.h
emergency-restart.h
errno-base.h
errno.h
fcntl.h Introduce O_CLOEXEC 2007-07-16 09:05:45 -07:00
futex.h
gpio.h [PATCH] GPIO core 2007-02-12 09:48:34 -08:00
ide_iops.h
ioctl.h
iomap.h
ipc.h
irq_regs.h
Kbuild Consolidate asm/poll.h 2007-05-11 08:29:34 -07:00
Kbuild.asm
kdebug.h move die notifier handling to common code 2007-05-08 11:15:04 -07:00
libata-portmap.h Fix Maple PATA IRQ assignment. 2007-01-26 17:27:40 -05:00
local.h local_t: architecture independent extension 2007-05-08 11:15:20 -07:00
memory_model.h [PATCH] typeof __page_to_pfn with SPARSEMEM=y 2007-02-11 10:51:17 -08:00
mm_hooks.h [PATCH] x86: PARAVIRT: add hooks to intercept mm creation and destruction 2007-05-02 19:27:14 +02:00
mman.h [PATCH] Remove final references to deprecated "MAP_ANON" page protection flag 2007-02-11 10:51:17 -08:00
mutex-dec.h
mutex-null.h
mutex-xchg.h
page.h Revert "[PATCH] LOG2: Alter get_order() so that it can make use of ilog2() on a constant" 2007-03-06 19:38:01 -08:00
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 Consolidate asm/poll.h 2007-05-11 08:29:34 -07:00
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