xz-fix-arm-fdt-compile-error-for-kmalloc-replacement.patch removed from -mm tree
The quilt patch titled
Subject: xz: fix the preboot code to match the kmalloc_obj change
has been removed from the -mm tree. Its filename was
xz-fix-arm-fdt-compile-error-for-kmalloc-replacement.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Haiyue Wang <[email protected]>
Subject: xz: fix the preboot code to match the kmalloc_obj change
Date: Sun, 22 Feb 2026 20:11:00 +0800
kmalloc was replaced with kmalloc_obj in lib/xz. Make the same change also in the preboot code to fix building of XZ-compressed kernel on a few archs. For example, on ARM:
In file included from arch/arm/boot/compressed/../../../../lib/decompress_unxz.c:241,
from arch/arm/boot/compressed/decompress.c:56:arch/arm/boot/compressed/../../../../lib/xz/xz_dec_stream.c: In function 'xz_dec_init':arch/arm/boot/compressed/../../../../lib/xz/xz_dec_stream.c:787:28: error: implicit declaration of function 'kmalloc_obj'; did you mean 'kmalloc'? [-Wimplicit-function-declaration]
787 | struct xz_dec *s = kmalloc_obj(*s);
| ^~~~~~~~~~~
| kmallocarch/arm/boot/compressed/../../../../lib/xz/xz_dec_stream.c:787:28: error: initialization of 'struct xz_dec *' from 'int' makes pointer from integer without a cast [-Wint-conversion] arch/arm/boot/compressed/../../../../lib/decompress_unxz.c:242:arch/arm/boot/compressed/../../../../lib/xz/xz_dec_lzma2.c: In function 'xz_dec_lzma2_create':arch/arm/boot/compressed/../../../../lib/xz/xz_dec_lzma2.c:1141:34: error: initialization of 'struct xz_dec_lzma2 *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
1141 | struct xz_dec_lzma2 *s = kmalloc_obj(*s);
| ^~~~~~~~~~~
arch/arm/boot/compressed/../../../../lib/decompress_unxz.c:243:
arch/arm/boot/compressed/../../../../lib/xz/xz_dec_bcj.c: In function 'xz_dec_bcj_create':
arch/arm/boot/compressed/../../../../lib/xz/xz_dec_bcj.c:594:32: error: initialization of 'struct xz_dec_bcj *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
594 | struct xz_dec_bcj *s = kmalloc_obj(*s);
| ^~~~~~~~~~~CC arch/arm/boot/compressed/fdt.o
---
lib/decompress_unxz.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
lib/decompress_unxz.c renamed from lib/decompress_unxz.c~xz-fix-arm-fdt-compile-error-for-kmalloc-replacement +2 -2
@@ -157,11 +157,11 @@* when XZ_DYNALLOC is used, but the pre-boot free() doesn't support it. * Workaround it here because the other decompressors don't need it. */ -#undef kmalloc +#undef kmalloc_obj#undef kfree#undef vmalloc#undef vfree -#define kmalloc (size, flags) malloc(size) +#define kmalloc_obj (type) malloc(sizeof(type))#define kfree (ptr) free(ptr)#define vmalloc (size) malloc(size)#define vfree (ptr) do { if (ptr != NULL) free(ptr); } while (0)
_
Patches currently in -mm which might be from [email protected] are