* arch/powerpc/mm/mem.c:53:12: error: no previous prototype for function 'create_section_mapping'
@ 2021-06-30 6:01 kernel test robot
0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2021-06-30 6:01 UTC (permalink / raw)
To: Christophe Leroy
Cc: clang-built-linux, kbuild-all, linux-kernel, Michael Ellerman
[-- Attachment #1: Type: text/plain, Size: 3678 bytes --]
Hi Christophe,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 007b350a58754a93ca9fe50c498cc27780171153
commit: b26e8f27253a47bff90972b987112fd8396e9b8d powerpc/mem: Move cache flushing functions into mm/cacheflush.c
date: 3 months ago
config: powerpc64-randconfig-r005-20210628 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8d21d5472501460933e78aead04cf59579025ba4)
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
# install powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b26e8f27253a47bff90972b987112fd8396e9b8d
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout b26e8f27253a47bff90972b987112fd8396e9b8d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
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/powerpc/mm/mem.c:15:
In file included from include/linux/memblock.h:13:
In file included from include/linux/mm.h:9:
In file included from include/linux/mmdebug.h:5:
In file included from include/linux/bug.h:5:
In file included from arch/powerpc/include/asm/bug.h:109:
In file included from include/asm-generic/bug.h:20:
In file included from include/linux/kernel.h:11:
In file included from include/linux/bitops.h:32:
In file included from arch/powerpc/include/asm/bitops.h:62:
arch/powerpc/include/asm/barrier.h:49:9: error: '__lwsync' macro redefined [-Werror,-Wmacro-redefined]
#define __lwsync() __asm__ __volatile__ (stringify_in_c(LWSYNC) : : :"memory")
^
<built-in>:310:9: note: previous definition is here
#define __lwsync __builtin_ppc_lwsync
^
>> arch/powerpc/mm/mem.c:53:12: error: no previous prototype for function 'create_section_mapping' [-Werror,-Wmissing-prototypes]
int __weak create_section_mapping(unsigned long start, unsigned long end,
^
arch/powerpc/mm/mem.c:53:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int __weak create_section_mapping(unsigned long start, unsigned long end,
^
static
2 errors generated.
vim +/create_section_mapping +53 arch/powerpc/mm/mem.c
bc02af93dd2bbd Yasunori Goto 2006-06-27 52
4e00c5affdd4b0 Logan Gunthorpe 2020-04-10 @53 int __weak create_section_mapping(unsigned long start, unsigned long end,
4e00c5affdd4b0 Logan Gunthorpe 2020-04-10 54 int nid, pgprot_t prot)
fecbfabe1dc940 Benjamin Herrenschmidt 2016-07-05 55 {
fecbfabe1dc940 Benjamin Herrenschmidt 2016-07-05 56 return -ENODEV;
fecbfabe1dc940 Benjamin Herrenschmidt 2016-07-05 57 }
fecbfabe1dc940 Benjamin Herrenschmidt 2016-07-05 58
:::::: The code at line 53 was first introduced by commit
:::::: 4e00c5affdd4b04e6392001716333971932f3d0c powerpc/mm: thread pgprot_t through create_section_mapping()
:::::: TO: Logan Gunthorpe <logang@deltatee.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 35640 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: arch/powerpc/mm/mem.c:53:12: error: no previous prototype for function 'create_section_mapping'
2021-06-05 3:11 kernel test robot
@ 2021-06-05 8:59 ` Christophe Leroy
0 siblings, 0 replies; 4+ messages in thread
From: Christophe Leroy @ 2021-06-05 8:59 UTC (permalink / raw)
To: kernel test robot
Cc: kbuild-all, clang-built-linux, linux-kernel, Michael Ellerman
Le 05/06/2021 à 05:11, kernel test robot a écrit :
> Hi Christophe,
>
> FYI, the error/warning still remains.
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: ff6091075a687676d76b3beb24fa77389b387b00
> commit: b26e8f27253a47bff90972b987112fd8396e9b8d powerpc/mem: Move cache flushing functions into mm/cacheflush.c
> date: 7 weeks ago
Fixed by
https://patchwork.ozlabs.org/project/linuxppc-dev/patch/3e5b63bb3daab54a1eb9c20221c2e9528c4db9b3.1622883330.git.christophe.leroy@csgroup.eu/
Christophe
> config: powerpc-randconfig-r005-20210605 (attached as .config)
> compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8ec9aa236e325fd4629cfeefac2919302e14d61a)
> 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
> # install powerpc cross compiling tool for clang build
> # apt-get install binutils-powerpc-linux-gnu
> # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b26e8f27253a47bff90972b987112fd8396e9b8d
> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> git fetch --no-tags linus master
> git checkout b26e8f27253a47bff90972b987112fd8396e9b8d
> # save the attached .config to linux build tree
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc
>
> 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 >>):
>
> ^
> arch/powerpc/include/asm/io.h:537:62: note: expanded from macro '__do_outl'
> #define __do_outl(val, port) writel(val,(PCI_IO_ADDR)_IO_BASE+port);
> ~~~~~~~~~~~~~~~~~~~~~^
> In file included from arch/powerpc/mm/mem.c:15:
> In file included from include/linux/memblock.h:14:
> In file included from arch/powerpc/include/asm/dma.h:22:
> In file included from arch/powerpc/include/asm/io.h:619:
> arch/powerpc/include/asm/io-defs.h:43:1: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
> DEF_PCI_AC_NORET(insb, (unsigned long p, void *b, unsigned long c),
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
> __do_##name al; \
> ^~~~~~~~~~~~~~
> <scratch space>:200:1: note: expanded from here
> __do_insb
> ^
> arch/powerpc/include/asm/io.h:556:56: note: expanded from macro '__do_insb'
> #define __do_insb(p, b, n) readsb((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
> ~~~~~~~~~~~~~~~~~~~~~^
> In file included from arch/powerpc/mm/mem.c:15:
> In file included from include/linux/memblock.h:14:
> In file included from arch/powerpc/include/asm/dma.h:22:
> In file included from arch/powerpc/include/asm/io.h:619:
> arch/powerpc/include/asm/io-defs.h:45:1: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
> DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
> __do_##name al; \
> ^~~~~~~~~~~~~~
> <scratch space>:202:1: note: expanded from here
> __do_insw
> ^
> arch/powerpc/include/asm/io.h:557:56: note: expanded from macro '__do_insw'
> #define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
> ~~~~~~~~~~~~~~~~~~~~~^
> In file included from arch/powerpc/mm/mem.c:15:
> In file included from include/linux/memblock.h:14:
> In file included from arch/powerpc/include/asm/dma.h:22:
> In file included from arch/powerpc/include/asm/io.h:619:
> arch/powerpc/include/asm/io-defs.h:47:1: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
> DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
> __do_##name al; \
> ^~~~~~~~~~~~~~
> <scratch space>:204:1: note: expanded from here
> __do_insl
> ^
> arch/powerpc/include/asm/io.h:558:56: note: expanded from macro '__do_insl'
> #define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
> ~~~~~~~~~~~~~~~~~~~~~^
> In file included from arch/powerpc/mm/mem.c:15:
> In file included from include/linux/memblock.h:14:
> In file included from arch/powerpc/include/asm/dma.h:22:
> In file included from arch/powerpc/include/asm/io.h:619:
> arch/powerpc/include/asm/io-defs.h:49:1: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
> DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
> __do_##name al; \
> ^~~~~~~~~~~~~~
> <scratch space>:206:1: note: expanded from here
> __do_outsb
> ^
> arch/powerpc/include/asm/io.h:559:58: note: expanded from macro '__do_outsb'
> #define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
> ~~~~~~~~~~~~~~~~~~~~~^
> In file included from arch/powerpc/mm/mem.c:15:
> In file included from include/linux/memblock.h:14:
> In file included from arch/powerpc/include/asm/dma.h:22:
> In file included from arch/powerpc/include/asm/io.h:619:
> arch/powerpc/include/asm/io-defs.h:51:1: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
> DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
> __do_##name al; \
> ^~~~~~~~~~~~~~
> <scratch space>:208:1: note: expanded from here
> __do_outsw
> ^
> arch/powerpc/include/asm/io.h:560:58: note: expanded from macro '__do_outsw'
> #define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
> ~~~~~~~~~~~~~~~~~~~~~^
> In file included from arch/powerpc/mm/mem.c:15:
> In file included from include/linux/memblock.h:14:
> In file included from arch/powerpc/include/asm/dma.h:22:
> In file included from arch/powerpc/include/asm/io.h:619:
> arch/powerpc/include/asm/io-defs.h:53:1: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
> DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
> __do_##name al; \
> ^~~~~~~~~~~~~~
> <scratch space>:210:1: note: expanded from here
> __do_outsl
> ^
> arch/powerpc/include/asm/io.h:561:58: note: expanded from macro '__do_outsl'
> #define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
> ~~~~~~~~~~~~~~~~~~~~~^
>>> arch/powerpc/mm/mem.c:53:12: error: no previous prototype for function 'create_section_mapping' [-Werror,-Wmissing-prototypes]
> int __weak create_section_mapping(unsigned long start, unsigned long end,
> ^
> arch/powerpc/mm/mem.c:53:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
> int __weak create_section_mapping(unsigned long start, unsigned long end,
> ^
> static
> 14 errors generated.
>
>
> vim +/create_section_mapping +53 arch/powerpc/mm/mem.c
>
> bc02af93dd2bbd Yasunori Goto 2006-06-27 52
> 4e00c5affdd4b0 Logan Gunthorpe 2020-04-10 @53 int __weak create_section_mapping(unsigned long start, unsigned long end,
> 4e00c5affdd4b0 Logan Gunthorpe 2020-04-10 54 int nid, pgprot_t prot)
> fecbfabe1dc940 Benjamin Herrenschmidt 2016-07-05 55 {
> fecbfabe1dc940 Benjamin Herrenschmidt 2016-07-05 56 return -ENODEV;
> fecbfabe1dc940 Benjamin Herrenschmidt 2016-07-05 57 }
> fecbfabe1dc940 Benjamin Herrenschmidt 2016-07-05 58
>
> :::::: The code at line 53 was first introduced by commit
> :::::: 4e00c5affdd4b04e6392001716333971932f3d0c powerpc/mm: thread pgprot_t through create_section_mapping()
>
> :::::: TO: Logan Gunthorpe <logang@deltatee.com>
> :::::: CC: Linus Torvalds <torvalds@linux-foundation.org>
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* arch/powerpc/mm/mem.c:53:12: error: no previous prototype for function 'create_section_mapping'
@ 2021-06-05 3:11 kernel test robot
2021-06-05 8:59 ` Christophe Leroy
0 siblings, 1 reply; 4+ messages in thread
From: kernel test robot @ 2021-06-05 3:11 UTC (permalink / raw)
To: Christophe Leroy
Cc: kbuild-all, clang-built-linux, linux-kernel, Michael Ellerman
[-- Attachment #1: Type: text/plain, Size: 9126 bytes --]
Hi Christophe,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: ff6091075a687676d76b3beb24fa77389b387b00
commit: b26e8f27253a47bff90972b987112fd8396e9b8d powerpc/mem: Move cache flushing functions into mm/cacheflush.c
date: 7 weeks ago
config: powerpc-randconfig-r005-20210605 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8ec9aa236e325fd4629cfeefac2919302e14d61a)
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
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b26e8f27253a47bff90972b987112fd8396e9b8d
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout b26e8f27253a47bff90972b987112fd8396e9b8d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc
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 >>):
^
arch/powerpc/include/asm/io.h:537:62: note: expanded from macro '__do_outl'
#define __do_outl(val, port) writel(val,(PCI_IO_ADDR)_IO_BASE+port);
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/mm/mem.c:15:
In file included from include/linux/memblock.h:14:
In file included from arch/powerpc/include/asm/dma.h:22:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:43:1: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insb, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:200:1: note: expanded from here
__do_insb
^
arch/powerpc/include/asm/io.h:556:56: note: expanded from macro '__do_insb'
#define __do_insb(p, b, n) readsb((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/mm/mem.c:15:
In file included from include/linux/memblock.h:14:
In file included from arch/powerpc/include/asm/dma.h:22:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:45:1: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:202:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:557:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/mm/mem.c:15:
In file included from include/linux/memblock.h:14:
In file included from arch/powerpc/include/asm/dma.h:22:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:47:1: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:204:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:558:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/mm/mem.c:15:
In file included from include/linux/memblock.h:14:
In file included from arch/powerpc/include/asm/dma.h:22:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:49:1: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:206:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:559:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/mm/mem.c:15:
In file included from include/linux/memblock.h:14:
In file included from arch/powerpc/include/asm/dma.h:22:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:51:1: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:208:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:560:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/mm/mem.c:15:
In file included from include/linux/memblock.h:14:
In file included from arch/powerpc/include/asm/dma.h:22:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:53:1: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:210:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:561:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
>> arch/powerpc/mm/mem.c:53:12: error: no previous prototype for function 'create_section_mapping' [-Werror,-Wmissing-prototypes]
int __weak create_section_mapping(unsigned long start, unsigned long end,
^
arch/powerpc/mm/mem.c:53:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int __weak create_section_mapping(unsigned long start, unsigned long end,
^
static
14 errors generated.
vim +/create_section_mapping +53 arch/powerpc/mm/mem.c
bc02af93dd2bbd Yasunori Goto 2006-06-27 52
4e00c5affdd4b0 Logan Gunthorpe 2020-04-10 @53 int __weak create_section_mapping(unsigned long start, unsigned long end,
4e00c5affdd4b0 Logan Gunthorpe 2020-04-10 54 int nid, pgprot_t prot)
fecbfabe1dc940 Benjamin Herrenschmidt 2016-07-05 55 {
fecbfabe1dc940 Benjamin Herrenschmidt 2016-07-05 56 return -ENODEV;
fecbfabe1dc940 Benjamin Herrenschmidt 2016-07-05 57 }
fecbfabe1dc940 Benjamin Herrenschmidt 2016-07-05 58
:::::: The code at line 53 was first introduced by commit
:::::: 4e00c5affdd4b04e6392001716333971932f3d0c powerpc/mm: thread pgprot_t through create_section_mapping()
:::::: TO: Logan Gunthorpe <logang@deltatee.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 22998 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* arch/powerpc/mm/mem.c:53:12: error: no previous prototype for function 'create_section_mapping'
@ 2021-05-27 22:14 kernel test robot
0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2021-05-27 22:14 UTC (permalink / raw)
To: Christophe Leroy
Cc: kbuild-all, clang-built-linux, linux-kernel, Michael Ellerman
[-- Attachment #1: Type: text/plain, Size: 9126 bytes --]
Hi Christophe,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 3224374f7eb08fbb36d3963895da20ff274b8e6a
commit: b26e8f27253a47bff90972b987112fd8396e9b8d powerpc/mem: Move cache flushing functions into mm/cacheflush.c
date: 6 weeks ago
config: powerpc-randconfig-r012-20210528 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 6505c630407c5feec818f0bb1c284f9eeebf2071)
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
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b26e8f27253a47bff90972b987112fd8396e9b8d
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout b26e8f27253a47bff90972b987112fd8396e9b8d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc
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 >>):
^
arch/powerpc/include/asm/io.h:537:62: note: expanded from macro '__do_outl'
#define __do_outl(val, port) writel(val,(PCI_IO_ADDR)_IO_BASE+port);
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/mm/mem.c:15:
In file included from include/linux/memblock.h:14:
In file included from arch/powerpc/include/asm/dma.h:22:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:43:1: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insb, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:179:1: note: expanded from here
__do_insb
^
arch/powerpc/include/asm/io.h:556:56: note: expanded from macro '__do_insb'
#define __do_insb(p, b, n) readsb((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/mm/mem.c:15:
In file included from include/linux/memblock.h:14:
In file included from arch/powerpc/include/asm/dma.h:22:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:45:1: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:181:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:557:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/mm/mem.c:15:
In file included from include/linux/memblock.h:14:
In file included from arch/powerpc/include/asm/dma.h:22:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:47:1: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:183:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:558:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/mm/mem.c:15:
In file included from include/linux/memblock.h:14:
In file included from arch/powerpc/include/asm/dma.h:22:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:49:1: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:185:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:559:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/mm/mem.c:15:
In file included from include/linux/memblock.h:14:
In file included from arch/powerpc/include/asm/dma.h:22:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:51:1: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:187:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:560:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/mm/mem.c:15:
In file included from include/linux/memblock.h:14:
In file included from arch/powerpc/include/asm/dma.h:22:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:53:1: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:189:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:561:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
>> arch/powerpc/mm/mem.c:53:12: error: no previous prototype for function 'create_section_mapping' [-Werror,-Wmissing-prototypes]
int __weak create_section_mapping(unsigned long start, unsigned long end,
^
arch/powerpc/mm/mem.c:53:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int __weak create_section_mapping(unsigned long start, unsigned long end,
^
static
13 errors generated.
vim +/create_section_mapping +53 arch/powerpc/mm/mem.c
bc02af93dd2bbd Yasunori Goto 2006-06-27 52
4e00c5affdd4b0 Logan Gunthorpe 2020-04-10 @53 int __weak create_section_mapping(unsigned long start, unsigned long end,
4e00c5affdd4b0 Logan Gunthorpe 2020-04-10 54 int nid, pgprot_t prot)
fecbfabe1dc940 Benjamin Herrenschmidt 2016-07-05 55 {
fecbfabe1dc940 Benjamin Herrenschmidt 2016-07-05 56 return -ENODEV;
fecbfabe1dc940 Benjamin Herrenschmidt 2016-07-05 57 }
fecbfabe1dc940 Benjamin Herrenschmidt 2016-07-05 58
:::::: The code at line 53 was first introduced by commit
:::::: 4e00c5affdd4b04e6392001716333971932f3d0c powerpc/mm: thread pgprot_t through create_section_mapping()
:::::: TO: Logan Gunthorpe <logang@deltatee.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36221 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-06-30 6:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-30 6:01 arch/powerpc/mm/mem.c:53:12: error: no previous prototype for function 'create_section_mapping' kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2021-06-05 3:11 kernel test robot
2021-06-05 8:59 ` Christophe Leroy
2021-05-27 22:14 kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).