Skip to content

Commit f993d24

Browse files
masahir0yhcahca
authored andcommitted
s390: fix -Wundef warning for CONFIG_KERNEL_ZSTD
Since commit 80b6093 ("kbuild: add -Wundef to KBUILD_CPPFLAGS for W=1 builds"), building with W=1 detects misuse of #(el)if. $ make W=1 ARCH=s390 CROSS_COMPILE=s390x-linux-gnu- [snip] arch/s390/boot/decompressor.c:28:7: warning: "CONFIG_KERNEL_ZSTD" is not defined, evaluates to 0 [-Wundef] 28 | #elif CONFIG_KERNEL_ZSTD | ^~~~~~~~~~~~~~~~~~ This issue has been hidden because arch/s390/boot/Makefile overwrites KBUILD_CFLAGS, dropping -Wundef. CONFIG_KERNEL_ZSTD is a bool option. #elif defined() should be used. The line #ifdef CONFIG_KERNEL_BZIP2 is fine, but I changed it for consistency. Signed-off-by: Masahiro Yamada <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Heiko Carstens <[email protected]>
1 parent a494398 commit f993d24

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/s390/boot/decompressor.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
#define memmove memmove
2424
#define memzero(s, n) memset((s), 0, (n))
2525

26-
#ifdef CONFIG_KERNEL_BZIP2
26+
#if defined(CONFIG_KERNEL_BZIP2)
2727
#define BOOT_HEAP_SIZE 0x400000
28-
#elif CONFIG_KERNEL_ZSTD
28+
#elif defined(CONFIG_KERNEL_ZSTD)
2929
#define BOOT_HEAP_SIZE 0x30000
3030
#else
3131
#define BOOT_HEAP_SIZE 0x10000

0 commit comments

Comments
 (0)