From: Heiko Carstens Date: Mon, 5 Jul 2021 18:57:49 +0000 (+0200) Subject: s390/irq: simplify on_async_stack() X-Git-Tag: accepted/tizen/unified/20230118.172025~6841^2~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bb250e64e4702774ddee052b57136ab222f59ce1;p=platform%2Fkernel%2Flinux-rpi.git s390/irq: simplify on_async_stack() Make on_async_stack() a bit more readable, even though as usual it depends if one considers "!!!" readable or not. At least the new construct to check if the async stack is in use or not is a bit shorter and generates slightly better code. Reviewed-by: Sven Schnelle Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik --- diff --git a/arch/s390/kernel/irq.c b/arch/s390/kernel/irq.c index b55af916..a1af5ec 100644 --- a/arch/s390/kernel/irq.c +++ b/arch/s390/kernel/irq.c @@ -110,7 +110,7 @@ static int on_async_stack(void) { unsigned long frame = current_frame_address(); - return !!!((S390_lowcore.async_stack - frame) >> (PAGE_SHIFT + THREAD_SIZE_ORDER)); + return ((S390_lowcore.async_stack ^ frame) & ~(THREAD_SIZE - 1)) == 0; } static void do_irq_async(struct pt_regs *regs, int irq)