Skip to contentSkip to conversation

linux-next: build failure after merge of the mm-nonmm-unstable tree

PATCH Stephen Rothwell 1 participant 1 message Nov 16, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi all,

After merging the mm-nonmm-unstable tree, today's linux-next build (powerpc ppc64_defconfig) failed like this:

In file included from drivers/of/fdt.c:28:
include/linux/kexec_handover.h:99:7: warning: no previous prototype for 'kho_alloc_preserve' [-Wmissing-prototypes]
99 | void *kho_alloc_preserve(size_t size)

      |       ^~~~~~~~~~~~~~~~~~
include/linux/kexec_handover.h:104:6: warning: no previous prototype for 'kho_unpreserve_free' [-Wmissing-prototypes]
  104 | void kho_unpreserve_free(void *mem) { }
      |      ^~~~~~~~~~~~~~~~~~~
include/linux/kexec_handover.h:105:6: warning: no previous prototype for 'kho_restore_free' [-Wmissing-prototypes]
  105 | void kho_restore_free(void *mem) { }
      |      ^~~~~~~~~~~~~~~~
In file included from mm/mm_init.c:34:
include/linux/kexec_handover.h:99:7: warning: no previous prototype for 'kho_alloc_preserve' [-Wmissing-prototypes]
   99 | void *kho_alloc_preserve(size_t size)
      |       ^~~~~~~~~~~~~~~~~~
include/linux/kexec_handover.h:104:6: warning: no previous prototype for 'kho_unpreserve_free' [-Wmissing-prototypes]
  104 | void kho_unpreserve_free(void *mem) { }
      |      ^~~~~~~~~~~~~~~~~~~
include/linux/kexec_handover.h:105:6: warning: no previous prototype for 'kho_restore_free' [-Wmissing-prototypes]
  105 | void kho_restore_free(void *mem) { }
      |      ^~~~~~~~~~~~~~~~

ld: drivers/of/fdt.o: in function `kho_alloc_preserve':
fdt.c:(.text+0x9c0): multiple definition of `kho_alloc_preserve'; mm/mm_init.o:mm_init.c:(.text+0x230): first defined here
ld: drivers/of/fdt.o: in function `kho_unpreserve_free':
fdt.c:(.text+0x9d0): multiple definition of `kho_unpreserve_free'; mm/mm_init.o:mm_init.c:(.text+0x240): first defined here
ld: drivers/of/fdt.o: in function `kho_restore_free':
fdt.c:(.text+0x9e0): multiple definition of `kho_restore_free'; mm/mm_init.o:mm_init.c:(.text+0x250): first defined here

Caused by commit

722b2ce4a04f ("kho: introduce high-level memory allocation API")

I have applied the following fix patch for today:

From: Stephen Rothwell <[email protected]>
Date: Mon, 17 Nov 2025 09:29:44 +1100
Subject: [PATCH] fix up for "kho: introduce high-level memory allocation API"

---
 include/linux/kexec_handover.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
include/linux/kexec_handover.h +3 -3
index 6dd0dcdf0ec1..5f7b9de97e8d 100644
@@ -96,13 +96,13 @@ static inline int kho_preserve_vmalloc(void *ptr,
 
 static inline void kho_unpreserve_vmalloc(struct kho_vmalloc *preservation) { }
 
-void *kho_alloc_preserve(size_t size)
+static inline void *kho_alloc_preserve(size_t size)
 {
 	return ERR_PTR(-EOPNOTSUPP);
 }
 
-void kho_unpreserve_free(void *mem) { }
-void kho_restore_free(void *mem) { }
+static inline void kho_unpreserve_free(void *mem) { }
+static inline void kho_restore_free(void *mem) { }
 
 static inline struct folio *kho_restore_folio(phys_addr_t phys)
 {
Signature · 8 lines
2.51.1

As a review nitpicks on that commit:  please do not do unrelated
formatting changes.  Also, there was not real reason for moving the
types.h include.
-- 
Cheers,
Stephen Rothwell