x86/unwind_user: Simplify unwind_user_word_size()

Get rid of superfluous ifdef and return explicit word size depending on
32-bit or 64-bit mode.

Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jens Remus <jremus@linux.ibm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20251208160352.1363040-5-jremus@linux.ibm.com
master
Jens Remus 2025-12-08 17:03:52 +01:00 committed by Peter Zijlstra
parent aa6047ef72
commit 3c48808408
1 changed files with 1 additions and 5 deletions

View File

@ -12,11 +12,7 @@ static inline int unwind_user_word_size(struct pt_regs *regs)
/* We can't unwind VM86 stacks */
if (regs->flags & X86_VM_MASK)
return 0;
#ifdef CONFIG_X86_64
if (!user_64bit_mode(regs))
return sizeof(int);
#endif
return sizeof(long);
return user_64bit_mode(regs) ? 8 : 4;
}
#endif /* CONFIG_UNWIND_USER */