Re: arch/mips/include/asm/pgalloc.h:81:22: error: redefinition of 'pud_alloc_one'

From: Mike Rapoport
Date: Wed Aug 12 2020 - 15:14:32 EST


On Thu, Aug 13, 2020 at 01:28:17AM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: fb893de323e2d39f7a1f6df425703a2edbdf56ea
> commit: d9e8b929670b4f79e07cdbcb0fb4f162a561d5c6 asm-generic: pgalloc: provide generic pud_alloc_one() and pud_free_one()
> date: 5 days ago
> config: mips-randconfig-p001-20200812 (attached as .config)
> compiler: mips64-linux-gcc (GCC) 9.3.0
> reproduce (this is a W=1 build):
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> git checkout d9e8b929670b4f79e07cdbcb0fb4f162a561d5c6
> # save the attached .config to linux build tree
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
>
> All errors (new ones prefixed by >>):
>
> In file included from arch/mips/mm/init.c:43:
> >> arch/mips/include/asm/pgalloc.h:81:22: error: redefinition of 'pud_alloc_one'
> 81 | static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long address)
> | ^~~~~~~~~~~~~
> In file included from arch/mips/include/asm/pgalloc.h:18,
> from arch/mips/mm/init.c:43:
> include/asm-generic/pgalloc.h:160:22: note: previous definition of 'pud_alloc_one' was here
> 160 | static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long addr)
> | ^~~~~~~~~~~~~
> arch/mips/mm/init.c:61:6: warning: no previous prototype for 'setup_zero_pages' [-Wmissing-prototypes]
> 61 | void setup_zero_pages(void)
> | ^~~~~~~~~~~~~~~~