lkml.org 
[lkml]   [2020]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: arch/mips/include/asm/pgalloc.h:81:22: error: redefinition of 'pud_alloc_one'
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@intel.com>
>
> 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)
> | ^~~~~~~~~~~~~~~~

From 03ab41f5c9f12733be3581333b512d99b0f75cac Mon Sep 17 00:00:00 2001
From: Mike Rapoport <rppt@linux.ibm.com>
Date: Wed, 12 Aug 2020 22:06:49 +0300
Subject: [PATCH] asm-generic: pgalloc.h: use correct #ifdef to enable pud_alloc_one()

The #ifdef statement that guards the generic version of pud_alloc_one() by
mistake used __HAVE_ARCH_PUD_FREE instead of __HAVE_ARCH_PUD_ALLOC_ONE.

Fix it.

Fixes: d9e8b929670b ("asm-generic: pgalloc: provide generic pud_alloc_one() and pud_free_one()")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
---
include/asm-generic/pgalloc.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/asm-generic/pgalloc.h b/include/asm-generic/pgalloc.h
index 6f44810921aa..02932efad3ab 100644
--- a/include/asm-generic/pgalloc.h
+++ b/include/asm-generic/pgalloc.h
@@ -147,7 +147,7 @@ static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)

#if CONFIG_PGTABLE_LEVELS > 3

-#ifndef __HAVE_ARCH_PUD_FREE
+#ifndef __HAVE_ARCH_PUD_ALLOC_ONE
/**
* pud_alloc_one - allocate a page for PUD-level page table
* @mm: the mm_struct of the current context
--
2.26.2

\
 
 \ /
  Last update: 2020-08-12 21:14    [W:0.033 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site