Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc: Drop unnecessary initializations in __copy_inst_from_kernel_nofault()

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>

-4
-4
arch/powerpc/include/asm/inst.h
··· 143 143 { 144 144 unsigned int val, suffix; 145 145 146 - /* See https://github.com/ClangBuiltLinux/linux/issues/1521 */ 147 - #if defined(CONFIG_CC_IS_CLANG) && CONFIG_CLANG_VERSION < 140000 148 - val = suffix = 0; 149 - #endif 150 146 __get_kernel_nofault(&val, src, u32, Efault); 151 147 if (IS_ENABLED(CONFIG_PPC64) && get_op(val) == OP_PREFIX) { 152 148 __get_kernel_nofault(&suffix, src + 1, u32, Efault);