From: Heiko Carstens Date: Tue, 26 May 2026 05:56:57 +0000 (+0200) Subject: s390/percpu: Add missing do { } while (0) constructs X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=b50403d4f3ea4dbdef758f21d4e11d40d9f61d7b;p=thirdparty%2Fkernel%2Flinux.git s390/percpu: Add missing do { } while (0) constructs Add missing do { } while (0) constructs in order to avoid potential build failures. Reported-by: Sashiko Closes: https://sashiko.dev/#/patchset/20260319120503.4046659-1-hca%40linux.ibm.com Reviewed-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev --- diff --git a/arch/s390/include/asm/percpu.h b/arch/s390/include/asm/percpu.h index 78602d2f5ebaa..79d5a4460b18a 100644 --- a/arch/s390/include/asm/percpu.h +++ b/arch/s390/include/asm/percpu.h @@ -136,7 +136,7 @@ #else /* MARCH_HAS_Z196_FEATURES */ #define arch_this_cpu_add(pcp, val, op1, op2, szcast) \ -{ \ +do { \ typedef typeof(pcp) pcp_op_T__; \ pcp_op_T__ val__ = (val); \ pcp_op_T__ old__, *ptr__; \ @@ -157,7 +157,7 @@ : "cc"); \ } \ preempt_enable_notrace(); \ -} +} while (0) #define this_cpu_add_4(pcp, val) arch_this_cpu_add(pcp, val, "laa", "asi", int) #define this_cpu_add_8(pcp, val) arch_this_cpu_add(pcp, val, "laag", "agsi", long) @@ -182,7 +182,7 @@ #define this_cpu_add_return_8(pcp, val) arch_this_cpu_add_return(pcp, val, "laag") #define arch_this_cpu_to_op(pcp, val, op) \ -{ \ +do { \ typedef typeof(pcp) pcp_op_T__; \ pcp_op_T__ val__ = (val); \ pcp_op_T__ old__, *ptr__; \ @@ -194,7 +194,7 @@ : [val__] "d" (val__) \ : "cc"); \ preempt_enable_notrace(); \ -} +} while (0) #define this_cpu_and_4(pcp, val) arch_this_cpu_to_op(pcp, val, "lan") #define this_cpu_and_8(pcp, val) arch_this_cpu_to_op(pcp, val, "lang")