Re: [akpm-mm:mm-new 117/130] ./include/asm-generic/fixmap.h:77:9: error: implicit declaration of function '__set_fixmap'; did you mean 'set_fixmap'?

Andrew Morton
2026-04-27T15:03:05Z

On Mon, 27 Apr 2026 22:45:39 +0800 kernel test robot <lkp@intel.com> wrote:

> tree: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-new
> head: 4f7b2cc1ad8719d55a8de9675a0aca65cb17c364
> commit: 93580c23bb3da5dd2926d6ae991ef04c2cdacaf2 [117/130] include/asm-generic/fixmap.h: reimplement nasty macros in C
> config: powerpc64-allnoconfig-bpf (https://download.01.org/0day-ci/archive/20260427/202604271114.ebmzs1LE-lkp@intel.com/config)
> compiler: powerpc64-linux-gnu-gcc (Debian 14.2.0-19) 14.2.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260427/202604271114.ebmzs1LE-lkp@intel.com/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/r/202604271114.ebmzs1LE-lkp@intel.com/
>
> All error/warnings (new ones prefixed by >>):
>
> In file included from ./arch/powerpc/include/asm/fixmap.h:91,
> from mm/early_ioremap.c:18:
> ./include/asm-generic/fixmap.h: In function '__set_fixmap_offset':
> >> ./include/asm-generic/fixmap.h:77:9: error: implicit declaration of function '__set_fixmap'; did you mean 'set_fixmap'? [-Wimplicit-function-declaration]
> 77 | __set_fixmap(idx, phys, flags);
> | ^~~~~~~~~~~~
> | set_fixmap
> ./arch/powerpc/include/asm/fixmap.h: At top level:
> >> ./arch/powerpc/include/asm/fixmap.h:93:20: warning: conflicting types for '__set_fixmap'; have 'void(enum fixed_addresses, phys_addr_t, pgprot_t)' {aka 'void(enum fixed_addresses, long long unsigned int, pgprot_t)'}
> 93 | static inline void __set_fixmap(enum fixed_addresses idx,
> | ^~~~~~~~~~~~

Sigh, thanks, of course one architecture had to go and be weird.

hacky fix:

--- a/arch/powerpc/include/asm/fixmap.h~include-asm-generic-fixmaph-reimplement-nasty-macros-in-c-fix-fix
+++ a/arch/powerpc/include/asm/fixmap.h
@@ -88,6 +88,9 @@ enum fixed_addresses {
#define FIXMAP_PAGE_NOCACHE PAGE_KERNEL_NCG
#define FIXMAP_PAGE_IO PAGE_KERNEL_NCG

+static inline void __set_fixmap(enum fixed_addresses idx,
+ phys_addr_t phys, pgprot_t flags);
+
#include <asm-generic/fixmap.h>

static inline void __set_fixmap(enum fixed_addresses idx,
_