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.commaster
parent
aa6047ef72
commit
3c48808408
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Reference in New Issue