From: Randy Dunlap <rdunlap@infradead.org>
To: Nick Desaulniers <ndesaulniers@google.com>,
Dan Williams <dan.j.williams@intel.com>
Cc: kernel test robot <lkp@intel.com>,
kbuild-all@lists.01.org,
clang-built-linux <clang-built-linux@googlegroups.com>,
Linux Memory Management List <linux-mm@kvack.org>,
Thomas Gleixner <tglx@linutronix.de>,
Christoph Hellwig <hch@lst.de>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [linux-next:master 5868/6773] arch/powerpc/mm/mem.c:91:12: warning: no previous prototype for function 'create_section_mapping'
Date: Wed, 18 Nov 2020 13:19:38 -0800 [thread overview]
Message-ID: <f67e234f-9ade-fb8e-1677-d2d92fb07f23@infradead.org> (raw)
In-Reply-To: <CAKwvOdnJYhs1vO8QmfPBdd107JRGfBQXTipCOZnaHe0=qSi0dQ@mail.gmail.com>
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
next prev parent reply other threads:[~2020-11-18 21:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-18 12:26 kernel test robot
2020-11-18 19:22 ` Dan Williams
2020-11-18 19:52 ` Nick Desaulniers
2020-11-18 21:19 ` Randy Dunlap [this message]
2020-11-18 21:38 ` Dan Williams
2020-11-18 22:48 ` Randy Dunlap
2020-11-18 22:32 ` Nick Desaulniers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f67e234f-9ade-fb8e-1677-d2d92fb07f23@infradead.org \
--to=rdunlap@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=clang-built-linux@googlegroups.com \
--cc=dan.j.williams@intel.com \
--cc=hch@lst.de \
--cc=kbuild-all@lists.01.org \
--cc=linux-mm@kvack.org \
--cc=lkp@intel.com \
--cc=ndesaulniers@google.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox