]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bootmem: add bootmem_type stub function
authorArnd Bergmann <arnd@arndb.de>
Tue, 15 Oct 2024 14:36:06 +0000 (14:36 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 1 Nov 2024 04:29:03 +0000 (21:29 -0700)
commit51067fd22842ec64eafe7ccd77fc1d60c2bb5453
tree8b6c42bb6dd7f9f86669c0d61dc9d97baf9664a5
parentba5e363e576455c0d411f951f10536f69218e885
bootmem: add bootmem_type stub function

When CONFIG_HAVE_BOOTMEM_INFO_NODE is disabled, the bootmem_type() and
bootmem_info() functions are not defined:

mm/sparse.c: In function 'free_map_bootmem':
mm/sparse.c:730:24: error: implicit declaration of function 'bootmem_type' [-Wimplicit-function-declaration]
  730 |                 type = bootmem_type(page);
      |                        ^~~~~~~~~~~~

mm/sparse.c: In function 'free_map_bootmem':
mm/sparse.c:735:39: error: implicit declaration of function 'bootmem_info'; did you mean 'bootmem_type'? [-Wimplicit-function-declaration]

Add trivial stub functions to make it build.

Link: https://lkml.kernel.org/r/20241015143802.577613-1-arnd@kernel.org
Fixes: 43d552a255a6 ("bootmem: stop using page->index")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/bootmem_info.h