]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
powerpc: Drop unnecessary initializations in __copy_inst_from_kernel_nofault()
authorNathan Chancellor <nathan@kernel.org>
Thu, 21 Aug 2025 21:15:43 +0000 (14:15 -0700)
committerNathan Chancellor <nathan@kernel.org>
Thu, 28 Aug 2025 23:58:44 +0000 (16:58 -0700)
Now that the minimum supported version of LLVM for building the kernel
has been bumped to 15.0.0, the zero initializations of val and suffix
added by commit 0d76914a4c99 ("powerpc/inst: Optimise
copy_inst_from_kernel_nofault()") to avoid a bogus case of
-Wuninitialized can be dropped because the preprocessor condition is
always false.

Reviewed-by: Kees Cook <kees@kernel.org>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20250821-bump-min-llvm-ver-15-v2-6-635f3294e5f0@kernel.org
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
arch/powerpc/include/asm/inst.h

index 684d3f453282188438769fd9329892c8b27a2356..ffa82167c860b1762d21d8c17beb4e53d3dc9dc4 100644 (file)
@@ -143,10 +143,6 @@ static inline int __copy_inst_from_kernel_nofault(ppc_inst_t *inst, u32 *src)
 {
        unsigned int val, suffix;
 
-/* See https://github.com/ClangBuiltLinux/linux/issues/1521 */
-#if defined(CONFIG_CC_IS_CLANG) && CONFIG_CLANG_VERSION < 140000
-       val = suffix = 0;
-#endif
        __get_kernel_nofault(&val, src, u32, Efault);
        if (IS_ENABLED(CONFIG_PPC64) && get_op(val) == OP_PREFIX) {
                __get_kernel_nofault(&suffix, src + 1, u32, Efault);