]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
lib/raid6: use vdupq_n_u8 to avoid endianness warnings
authorndesaulniers@google.com <ndesaulniers@google.com>
Tue, 26 Feb 2019 04:03:42 +0000 (20:03 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Apr 2020 08:30:15 +0000 (10:30 +0200)
commit00dd1df3c24fdcdc5331f5ab6e65a82cab1f1412
tree21a22481c90975ec54f210d887782d728d4a39c9
parent017917fef5c6a231a54537e349f3eb7fab8b787c
lib/raid6: use vdupq_n_u8 to avoid endianness warnings

commit 1ad3935b39da78a403e7df7a3813f866c731bc64 upstream.

Clang warns: vector initializers are not compatible with NEON intrinsics
in big endian mode [-Wnonportable-vector-initialization]

While this is usually the case, it's not an issue for this case since
we're initializing the uint8x16_t (16x uint8_t's) with the same value.

Instead, use vdupq_n_u8 which both compilers lower into a single movi
instruction: https://godbolt.org/z/vBrgzt

This avoids the static storage for a constant value.

Link: https://github.com/ClangBuiltLinux/linux/issues/214
Suggested-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
lib/raid6/neon.uc
lib/raid6/recov_neon_inner.c