Skip to content

Commit 488954c

Browse files
committed
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 0d76914 ("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 <[email protected]> Reviewed-by: Christophe Leroy <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Nathan Chancellor <[email protected]>
1 parent e633c2e commit 488954c

File tree

1 file changed

+0
-4
lines changed
  • arch/powerpc/include/asm

1 file changed

+0
-4
lines changed

arch/powerpc/include/asm/inst.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,6 @@ static inline int __copy_inst_from_kernel_nofault(ppc_inst_t *inst, u32 *src)
143143
{
144144
unsigned int val, suffix;
145145

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
150146
__get_kernel_nofault(&val, src, u32, Efault);
151147
if (IS_ENABLED(CONFIG_PPC64) && get_op(val) == OP_PREFIX) {
152148
__get_kernel_nofault(&suffix, src + 1, u32, Efault);

0 commit comments

Comments
 (0)