x86, asm: use bool for bitops and other assembly outputs
The gcc people have confirmed that using "bool" when combined with inline assembly always is treated as a byte-sized operand that can be assumed to be 0 or 1, which is exactly what the SET instruction emits. Change the output types and intermediate variables of as many operations as practical to "bool". Signed-off-by:H. Peter Anvin <hpa@zytor.com> Link: http://lkml.kernel.org/r/1465414726-197858-3-git-send-email-hpa@linux.intel.com Reviewed-by:
Andy Lutomirski <luto@kernel.org> Reviewed-by:
Borislav Petkov <bp@suse.de> Acked-by:
Peter Zijlstra (Intel) <peterz@infradead.org>
Showing
- arch/x86/boot/bitops.h 5 additions, 3 deletionsarch/x86/boot/bitops.h
- arch/x86/boot/boot.h 4 additions, 4 deletionsarch/x86/boot/boot.h
- arch/x86/boot/string.c 1 addition, 1 deletionarch/x86/boot/string.c
- arch/x86/include/asm/apm.h 3 additions, 3 deletionsarch/x86/include/asm/apm.h
- arch/x86/include/asm/archrandom.h 8 additions, 8 deletionsarch/x86/include/asm/archrandom.h
- arch/x86/include/asm/atomic.h 4 additions, 4 deletionsarch/x86/include/asm/atomic.h
- arch/x86/include/asm/atomic64_64.h 5 additions, 5 deletionsarch/x86/include/asm/atomic64_64.h
- arch/x86/include/asm/bitops.h 14 additions, 14 deletionsarch/x86/include/asm/bitops.h
- arch/x86/include/asm/local.h 4 additions, 4 deletionsarch/x86/include/asm/local.h
- arch/x86/include/asm/percpu.h 4 additions, 4 deletionsarch/x86/include/asm/percpu.h
- arch/x86/include/asm/rmwcc.h 2 additions, 2 deletionsarch/x86/include/asm/rmwcc.h
- arch/x86/include/asm/rwsem.h 9 additions, 8 deletionsarch/x86/include/asm/rwsem.h
- include/linux/random.h 6 additions, 6 deletionsinclude/linux/random.h
Please register or sign in to comment