[PATCHv7 03/13] lib/decompress: Keep decompressor when CONFIG_KEEP_DECOMPRESSOR
bot+bpf-ci at kernel.org
bot+bpf-ci at kernel.org
Sat Mar 21 19:26:35 PDT 2026
> diff --git a/include/linux/decompress/mm.h b/include/linux/decompress/mm.h
> index ac862422df15..39df02bcbc66 100644
> --- a/include/linux/decompress/mm.h
> +++ b/include/linux/decompress/mm.h
[ ... ]
> @@ -92,7 +93,14 @@ MALLOC_VISIBLE void free(void *where)
> #define large_malloc(a) vmalloc(a)
> #define large_free(a) vfree(a)
>
> +#ifdef CONFIG_KEEP_DECOMPRESSOR
> +#define INIT
> +#define INITCONST
> +#else
> #define INIT __init
> +#define INITCONST __initconst
> +#endif
The INITCONST macro is defined here in the kernel path (the #else
branch of #ifdef STATIC), but the pre-boot path earlier in this
header only defines INIT:
include/linux/decompress/mm.h:
#ifdef STATIC
...
#define INIT
Should INITCONST also be defined in the pre-boot path for
consistency? The individual decompressor files (decompress_inflate.c,
decompress_bunzip2.c, etc.) all include this header and are compiled
in both contexts. If any of them later uses INITCONST for a const
array following the pattern in lib/decompress.c, the pre-boot build
would fail with an undefined macro.
---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md
CI run summary: https://github.com/kernel-patches/bpf/actions/runs/23393379437
More information about the kexec
mailing list