* [linux-next:master 5868/6773] arch/powerpc/mm/mem.c:91:12: warning: no previous prototype for function 'create_section_mapping'
@ 2020-11-18 12:26 kernel test robot
2020-11-18 19:22 ` Dan Williams
0 siblings, 1 reply; 7+ messages in thread
From: kernel test robot @ 2020-11-18 12:26 UTC (permalink / raw)
To: Dan Williams
Cc: kbuild-all, clang-built-linux, Linux Memory Management List,
Thomas Gleixner, Christoph Hellwig, Andrew Morton
[-- Attachment #1: Type: text/plain, Size: 2785 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 2052923327794192c5d884623b5ee5fec1867bda
commit: d106ad47e292fde47fc09e16a2ddc13609ff2ad1 [5868/6773] mm-fix-phys_to_target_node-and-memory_add_physaddr_to_nid-exports-v4
config: powerpc64-randconfig-r026-20201118 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project b2613fb2f0f53691dd0211895afbb9413457fca7)
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/next/linux-next.git/commit/?id=d106ad47e292fde47fc09e16a2ddc13609ff2ad1
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout d106ad47e292fde47fc09e16a2ddc13609ff2ad1
# 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 warnings (new ones prefixed by >>):
>> arch/powerpc/mm/mem.c:91:12: warning: no previous prototype for function 'create_section_mapping' [-Wmissing-prototypes]
int __weak create_section_mapping(unsigned long start, unsigned long end,
^
arch/powerpc/mm/mem.c:91: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
1 warning generated.
vim +/create_section_mapping +91 arch/powerpc/mm/mem.c
bc02af93dd2bbdd Yasunori Goto 2006-06-27 90
4e00c5affdd4b04 Logan Gunthorpe 2020-04-10 @91 int __weak create_section_mapping(unsigned long start, unsigned long end,
4e00c5affdd4b04 Logan Gunthorpe 2020-04-10 92 int nid, pgprot_t prot)
fecbfabe1dc9405 Benjamin Herrenschmidt 2016-07-05 93 {
fecbfabe1dc9405 Benjamin Herrenschmidt 2016-07-05 94 return -ENODEV;
fecbfabe1dc9405 Benjamin Herrenschmidt 2016-07-05 95 }
fecbfabe1dc9405 Benjamin Herrenschmidt 2016-07-05 96
:::::: The code at line 91 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: 32306 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [linux-next:master 5868/6773] arch/powerpc/mm/mem.c:91:12: warning: no previous prototype for function 'create_section_mapping'
2020-11-18 12:26 [linux-next:master 5868/6773] arch/powerpc/mm/mem.c:91:12: warning: no previous prototype for function 'create_section_mapping' kernel test robot
@ 2020-11-18 19:22 ` Dan Williams
2020-11-18 19:52 ` Nick Desaulniers
2020-11-18 22:32 ` Nick Desaulniers
0 siblings, 2 replies; 7+ messages in thread
From: Dan Williams @ 2020-11-18 19:22 UTC (permalink / raw)
To: kernel test robot
Cc: kbuild-all, clang-built-linux, Linux Memory Management List,
Thomas Gleixner, Christoph Hellwig, Andrew Morton
On Wed, Nov 18, 2020 at 4:27 AM kernel test robot <lkp@intel.com> wrote:
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head: 2052923327794192c5d884623b5ee5fec1867bda
> commit: d106ad47e292fde47fc09e16a2ddc13609ff2ad1 [5868/6773] mm-fix-phys_to_target_node-and-memory_add_physaddr_to_nid-exports-v4
> config: powerpc64-randconfig-r026-20201118 (attached as .config)
> compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project b2613fb2f0f53691dd0211895afbb9413457fca7)
> 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/next/linux-next.git/commit/?id=d106ad47e292fde47fc09e16a2ddc13609ff2ad1
> git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> git fetch --no-tags linux-next master
> git checkout d106ad47e292fde47fc09e16a2ddc13609ff2ad1
> # save the attached .config to linux build tree
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
I get:
Makefile:597: arch/powerpc64/Makefile: No such file or directory
make[1]: *** No rule to make target 'arch/powerpc64/Makefile'. Stop.
make: *** [Makefile:712: include/config/auto.conf.cmd] Error 2
...changing it to ARCH=powerpc I get:
Assembler messages:
Fatal error: invalid listing option `3'
clang: error: assembler command failed with exit code 1 (use -v to see
invocation)
make[1]: *** [scripts/Makefile.build:283: scripts/mod/empty.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1199: prepare0] Error 2
This is on a Fedora 31 host.
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> All warnings (new ones prefixed by >>):
>
> >> arch/powerpc/mm/mem.c:91:12: warning: no previous prototype for function 'create_section_mapping' [-Wmissing-prototypes]
> int __weak create_section_mapping(unsigned long start, unsigned long end,
> ^
> arch/powerpc/mm/mem.c:91: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
> 1 warning generated.
I do not see these errors with gcc.
I feel like clang errors should be flagged / de-emphasized when the
same error does not appear on gcc.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [linux-next:master 5868/6773] arch/powerpc/mm/mem.c:91:12: warning: no previous prototype for function 'create_section_mapping'
2020-11-18 19:22 ` Dan Williams
@ 2020-11-18 19:52 ` Nick Desaulniers
2020-11-18 21:19 ` Randy Dunlap
2020-11-18 22:32 ` Nick Desaulniers
1 sibling, 1 reply; 7+ messages in thread
From: Nick Desaulniers @ 2020-11-18 19:52 UTC (permalink / raw)
To: Dan Williams
Cc: kernel test robot, kbuild-all, clang-built-linux,
Linux Memory Management List, Thomas Gleixner, Christoph Hellwig,
Andrew Morton
On Wed, Nov 18, 2020 at 11:22 AM Dan Williams <dan.j.williams@intel.com> wrote:
>
> On Wed, Nov 18, 2020 at 4:27 AM kernel test robot <lkp@intel.com> wrote:
> >
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > head: 2052923327794192c5d884623b5ee5fec1867bda
> > commit: d106ad47e292fde47fc09e16a2ddc13609ff2ad1 [5868/6773] mm-fix-phys_to_target_node-and-memory_add_physaddr_to_nid-exports-v4
> > config: powerpc64-randconfig-r026-20201118 (attached as .config)
^ randconfig
> > compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project b2613fb2f0f53691dd0211895afbb9413457fca7)
> > reproduce (this is a W=1 build):
^ W=1
> > 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/next/linux-next.git/commit/?id=d106ad47e292fde47fc09e16a2ddc13609ff2ad1
> > git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> > git fetch --no-tags linux-next master
> > git checkout d106ad47e292fde47fc09e16a2ddc13609ff2ad1
> > # save the attached .config to linux build tree
> > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
>
> I get:
>
> Makefile:597: arch/powerpc64/Makefile: No such file or directory
> make[1]: *** No rule to make target 'arch/powerpc64/Makefile'. Stop.
> make: *** [Makefile:712: include/config/auto.conf.cmd] Error 2
>
> ...changing it to ARCH=powerpc I get:
>
> Assembler messages:
> Fatal error: invalid listing option `3'
> clang: error: assembler command failed with exit code 1 (use -v to see
> invocation)
> make[1]: *** [scripts/Makefile.build:283: scripts/mod/empty.o] Error 1
> make[1]: *** Waiting for unfinished jobs....
> make: *** [Makefile:1199: prepare0] Error 2
>
> This is on a Fedora 31 host.
>
> >
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kernel test robot <lkp@intel.com>
> >
> > All warnings (new ones prefixed by >>):
> >
> > >> arch/powerpc/mm/mem.c:91:12: warning: no previous prototype for function 'create_section_mapping' [-Wmissing-prototypes]
> > int __weak create_section_mapping(unsigned long start, unsigned long end,
> > ^
> > arch/powerpc/mm/mem.c:91: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
> > 1 warning generated.
>
> I do not see these errors with gcc.
>
> I feel like clang errors should be flagged / de-emphasized when the
> same error does not appear on gcc.
Note this is a W=1 build. For this warning, you either need to mark
functions as having static linkage, or provide a prototype in a header
so that callers know the correct function signature.
--
Thanks,
~Nick Desaulniers
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [linux-next:master 5868/6773] arch/powerpc/mm/mem.c:91:12: warning: no previous prototype for function 'create_section_mapping'
2020-11-18 19:52 ` Nick Desaulniers
@ 2020-11-18 21:19 ` Randy Dunlap
2020-11-18 21:38 ` Dan Williams
0 siblings, 1 reply; 7+ messages in thread
From: Randy Dunlap @ 2020-11-18 21:19 UTC (permalink / raw)
To: Nick Desaulniers, Dan Williams
Cc: kernel test robot, kbuild-all, clang-built-linux,
Linux Memory Management List, Thomas Gleixner, Christoph Hellwig,
Andrew Morton
On 11/18/20 11:52 AM, Nick Desaulniers wrote:
> On Wed, Nov 18, 2020 at 11:22 AM Dan Williams <dan.j.williams@intel.com> wrote:
>>
>> On Wed, Nov 18, 2020 at 4:27 AM kernel test robot <lkp@intel.com> wrote:
>>>
>>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
>>> head: 2052923327794192c5d884623b5ee5fec1867bda
>>> commit: d106ad47e292fde47fc09e16a2ddc13609ff2ad1 [5868/6773] mm-fix-phys_to_target_node-and-memory_add_physaddr_to_nid-exports-v4
>>> config: powerpc64-randconfig-r026-20201118 (attached as .config)
>
> ^ randconfig
>
>>> compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project b2613fb2f0f53691dd0211895afbb9413457fca7)
>>> reproduce (this is a W=1 build):
>
> ^ W=1
>
>>> 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/next/linux-next.git/commit/?id=d106ad47e292fde47fc09e16a2ddc13609ff2ad1
>>> git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
>>> git fetch --no-tags linux-next master
>>> git checkout d106ad47e292fde47fc09e16a2ddc13609ff2ad1
>>> # save the attached .config to linux build tree
>>> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
>>
>> I get:
>>
>> Makefile:597: arch/powerpc64/Makefile: No such file or directory
>> make[1]: *** No rule to make target 'arch/powerpc64/Makefile'. Stop.
>> make: *** [Makefile:712: include/config/auto.conf.cmd] Error 2
>>
>> ...changing it to ARCH=powerpc I get:
>>
>> Assembler messages:
>> Fatal error: invalid listing option `3'
>> clang: error: assembler command failed with exit code 1 (use -v to see
>> invocation)
>> make[1]: *** [scripts/Makefile.build:283: scripts/mod/empty.o] Error 1
>> make[1]: *** Waiting for unfinished jobs....
>> make: *** [Makefile:1199: prepare0] Error 2
>>
>> This is on a Fedora 31 host.
>>
>>>
>>> If you fix the issue, kindly add following tag as appropriate
>>> Reported-by: kernel test robot <lkp@intel.com>
>>>
>>> All warnings (new ones prefixed by >>):
>>>
>>>>> arch/powerpc/mm/mem.c:91:12: warning: no previous prototype for function 'create_section_mapping' [-Wmissing-prototypes]
>>> int __weak create_section_mapping(unsigned long start, unsigned long end,
>>> ^
>>> arch/powerpc/mm/mem.c:91: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
>>> 1 warning generated.
>>
>> I do not see these errors with gcc.
>>
>> I feel like clang errors should be flagged / de-emphasized when the
>> same error does not appear on gcc.
>
> Note this is a W=1 build. For this warning, you either need to mark
> functions as having static linkage, or provide a prototype in a header
> so that callers know the correct function signature.
Yes, so with gcc, that gave me something like 109 missing prototype
warnings -- including one for 'create_section_mapping'.
--
~Randy
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [linux-next:master 5868/6773] arch/powerpc/mm/mem.c:91:12: warning: no previous prototype for function 'create_section_mapping'
2020-11-18 21:19 ` Randy Dunlap
@ 2020-11-18 21:38 ` Dan Williams
2020-11-18 22:48 ` Randy Dunlap
0 siblings, 1 reply; 7+ messages in thread
From: Dan Williams @ 2020-11-18 21:38 UTC (permalink / raw)
To: Randy Dunlap
Cc: Nick Desaulniers, kernel test robot, kbuild-all,
clang-built-linux, Linux Memory Management List, Thomas Gleixner,
Christoph Hellwig, Andrew Morton
On Wed, Nov 18, 2020 at 1:20 PM Randy Dunlap <rdunlap@infradead.org> wrote:
[..]
> Yes, so with gcc, that gave me something like 109 missing prototype
> warnings -- including one for 'create_section_mapping'.
You see those with this [1] applied? I don't see those warnings
anymore with gcc-10.2.0 and that patch.
[1]: http://lore.kernel.org/r/160558386174.2948926.2740149041249041764.stgit@dwillia2-desk3.amr.corp.intel.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [linux-next:master 5868/6773] arch/powerpc/mm/mem.c:91:12: warning: no previous prototype for function 'create_section_mapping'
2020-11-18 19:22 ` Dan Williams
2020-11-18 19:52 ` Nick Desaulniers
@ 2020-11-18 22:32 ` Nick Desaulniers
1 sibling, 0 replies; 7+ messages in thread
From: Nick Desaulniers @ 2020-11-18 22:32 UTC (permalink / raw)
To: Dan Williams
Cc: kernel test robot, kbuild-all, clang-built-linux,
Linux Memory Management List, Thomas Gleixner, Christoph Hellwig,
Andrew Morton
On Wed, Nov 18, 2020 at 11:22 AM Dan Williams <dan.j.williams@intel.com> wrote:
>
> I do not see these errors with gcc.
>
> I feel like clang errors should be flagged / de-emphasized when the
> same error does not appear on gcc.
Also, note that Clang has warnings GCC does not, and vice versa (I
imagine a Venn Diagram). I give you the benefit of the doubt to mean
"warnings that both compilers support, but only one is emitting for
whatever reason" which is fair; though warnings unique to one compiler
can be a competitive advantage.
--
Thanks,
~Nick Desaulniers
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [linux-next:master 5868/6773] arch/powerpc/mm/mem.c:91:12: warning: no previous prototype for function 'create_section_mapping'
2020-11-18 21:38 ` Dan Williams
@ 2020-11-18 22:48 ` Randy Dunlap
0 siblings, 0 replies; 7+ messages in thread
From: Randy Dunlap @ 2020-11-18 22:48 UTC (permalink / raw)
To: Dan Williams
Cc: Nick Desaulniers, kernel test robot, kbuild-all,
clang-built-linux, Linux Memory Management List, Thomas Gleixner,
Christoph Hellwig, Andrew Morton
On 11/18/20 1:38 PM, Dan Williams wrote:
> On Wed, Nov 18, 2020 at 1:20 PM Randy Dunlap <rdunlap@infradead.org> wrote:
> [..]
>> Yes, so with gcc, that gave me something like 109 missing prototype
>> warnings -- including one for 'create_section_mapping'.
>
> You see those with this [1] applied? I don't see those warnings
> anymore with gcc-10.2.0 and that patch.
>
> [1]: http://lore.kernel.org/r/160558386174.2948926.2740149041249041764.stgit@dwillia2-desk3.amr.corp.intel.com
>
No, I was testing today's linux-next (20201118).
and gcc 7.5.0.
After applying that patch, that 1 out of 111 -Wmissing-prototype warnings
is gone. :)
Thanks.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-11-18 22:48 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-18 12:26 [linux-next:master 5868/6773] arch/powerpc/mm/mem.c:91:12: warning: no previous prototype for function 'create_section_mapping' kernel test robot
2020-11-18 19:22 ` Dan Williams
2020-11-18 19:52 ` Nick Desaulniers
2020-11-18 21:19 ` Randy Dunlap
2020-11-18 21:38 ` Dan Williams
2020-11-18 22:48 ` Randy Dunlap
2020-11-18 22:32 ` Nick Desaulniers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox