kernel_optimize_test/arch
Arnd Bergmann a6a6d3b1f8 x86: kvm: avoid constant-conversion warning
clang finds a contruct suspicious that converts an unsigned
character to a signed integer and back, causing an overflow:

arch/x86/kvm/mmu.c:4605:39: error: implicit conversion from 'int' to 'u8' (aka 'unsigned char') changes value from -205 to 51 [-Werror,-Wconstant-conversion]
                u8 wf = (pfec & PFERR_WRITE_MASK) ? ~w : 0;
                   ~~                               ^~
arch/x86/kvm/mmu.c:4607:38: error: implicit conversion from 'int' to 'u8' (aka 'unsigned char') changes value from -241 to 15 [-Werror,-Wconstant-conversion]
                u8 uf = (pfec & PFERR_USER_MASK) ? ~u : 0;
                   ~~                              ^~
arch/x86/kvm/mmu.c:4609:39: error: implicit conversion from 'int' to 'u8' (aka 'unsigned char') changes value from -171 to 85 [-Werror,-Wconstant-conversion]
                u8 ff = (pfec & PFERR_FETCH_MASK) ? ~x : 0;
                   ~~                               ^~

Add an explicit cast to tell clang that everything works as
intended here.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://github.com/ClangBuiltLinux/linux/issues/95
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-07-15 12:50:30 +02:00
..
alpha Kconfig updates for v5.3 2019-07-12 16:06:27 -07:00
arc Kbuild updates for v5.3 2019-07-12 16:03:16 -07:00
arm ARM: 2019-07-12 15:35:14 -07:00
arm64 Kconfig updates for v5.3 2019-07-12 16:06:27 -07:00
c6x Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu 2019-07-10 21:42:03 -07:00
csky Kconfig updates for v5.3 2019-07-12 16:06:27 -07:00
h8300 Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu 2019-07-10 21:42:03 -07:00
hexagon Merge branch 'siginfo-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2019-07-08 21:48:15 -07:00
ia64 TTY / Serial driver updates for 5.3-rc1 2019-07-11 15:38:21 -07:00
m68k Merge branch 'akpm' (patches from Andrew) 2019-07-12 11:40:28 -07:00
microblaze clone3-v5.3 2019-07-11 10:09:44 -07:00
mips asm-generic: remove ptrace.h 2019-07-12 15:41:33 -07:00
nds32 Kconfig updates for v5.3 2019-07-12 16:06:27 -07:00
nios2 nios2 update for v5.3-rc1 2019-07-12 15:38:05 -07:00
openrisc dma-mapping updates for Linux 5.3 2019-07-12 15:13:55 -07:00
parisc Kbuild updates for v5.3 2019-07-12 16:03:16 -07:00
powerpc Kbuild updates for v5.3 2019-07-12 16:03:16 -07:00
riscv Kconfig updates for v5.3 2019-07-12 16:06:27 -07:00
s390 Kconfig updates for v5.3 2019-07-12 16:06:27 -07:00
sh asm-generic: remove ptrace.h 2019-07-12 15:41:33 -07:00
sparc mm: rename CONFIG_HAVE_GENERIC_GUP to CONFIG_HAVE_FAST_GUP 2019-07-12 11:05:44 -07:00
um Kbuild updates for v5.3 2019-07-12 16:03:16 -07:00
unicore32 Kconfig updates for v5.3 2019-07-12 16:06:27 -07:00
x86 x86: kvm: avoid constant-conversion warning 2019-07-15 12:50:30 +02:00
xtensa dma-mapping updates for Linux 5.3 2019-07-12 15:13:55 -07:00
.gitignore
Kconfig dma-direct: provide generic support for uncached kernel segments 2019-06-03 16:00:08 +02:00