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

Configure Feed

Select the types of activity you want to include in your feed.

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

authored by

Jens Remus and committed by
Peter Zijlstra
3c488084 aa6047ef

+1 -5
+1 -5
arch/x86/include/asm/unwind_user.h
··· 12 12 /* We can't unwind VM86 stacks */ 13 13 if (regs->flags & X86_VM_MASK) 14 14 return 0; 15 - #ifdef CONFIG_X86_64 16 - if (!user_64bit_mode(regs)) 17 - return sizeof(int); 18 - #endif 19 - return sizeof(long); 15 + return user_64bit_mode(regs) ? 8 : 4; 20 16 } 21 17 22 18 #endif /* CONFIG_UNWIND_USER */