From: Heiko Carstens Date: Thu, 9 Mar 2023 19:12:28 +0000 (+0100) Subject: s390/setup: always inline gen_lpswe() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=029a4f4b9555ddb47f38f9589fd6d43277efb9c6;p=linux.git s390/setup: always inline gen_lpswe() gen_lpswe() contains a BUILD_BUG_ON() statement which depends on a function parameter. If the compiler decides to generate a not inlined function this will lead to a build error, even if all call sites pass a valid parameter. To avoid this always inline gen_lpswe(). Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik --- diff --git a/arch/s390/include/asm/setup.h b/arch/s390/include/asm/setup.h index 3a1f8825bc7d7..5271bb278cfac 100644 --- a/arch/s390/include/asm/setup.h +++ b/arch/s390/include/asm/setup.h @@ -164,7 +164,7 @@ struct oldmem_data { }; extern struct oldmem_data oldmem_data; -static inline u32 gen_lpswe(unsigned long addr) +static __always_inline u32 gen_lpswe(unsigned long addr) { BUILD_BUG_ON(addr > 0xfff); return 0xb2b20000 | addr;