From: kernel test robot <lkp@intel.com>
To: Mark Rutland <mark.rutland@arm.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
linux-kernel@vger.kernel.org
Subject: lib/atomic64.c:124:1: warning: no previous prototype for function 'generic_atomic64_and_return'
Date: Fri, 12 Nov 2021 02:19:25 +0800 [thread overview]
Message-ID: <202111120213.rkw9n6qF-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 5733 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: debe436e77c72fcee804fb867f275e6d31aa999c
commit: 1bdadf46eff6804ace5fa46b6856da4799f12b5c locking/atomic: atomic64: support ARCH_ATOMIC
date: 6 months ago
config: arm-randconfig-c002-20211109 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project f3798ad5fa845771846599f3c088016e3aef800c)
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 arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1bdadf46eff6804ace5fa46b6856da4799f12b5c
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 1bdadf46eff6804ace5fa46b6856da4799f12b5c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm
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 >>):
>> lib/atomic64.c:124:1: warning: no previous prototype for function 'generic_atomic64_and_return' [-Wmissing-prototypes]
ATOMIC64_OPS(and, &=)
^
lib/atomic64.c:121:2: note: expanded from macro 'ATOMIC64_OPS'
ATOMIC64_OP_RETURN(op, c_op) \
^
lib/atomic64.c:82:5: note: expanded from macro 'ATOMIC64_OP_RETURN'
s64 generic_atomic64_##op##_return(s64 a, atomic64_t *v) \
^
<scratch space>:147:1: note: expanded from here
generic_atomic64_and_return
^
lib/atomic64.c:124:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
lib/atomic64.c:121:2: note: expanded from macro 'ATOMIC64_OPS'
ATOMIC64_OP_RETURN(op, c_op) \
^
lib/atomic64.c:81:42: note: expanded from macro 'ATOMIC64_OP_RETURN'
#define ATOMIC64_OP_RETURN(op, c_op) \
^
>> lib/atomic64.c:125:1: warning: no previous prototype for function 'generic_atomic64_or_return' [-Wmissing-prototypes]
ATOMIC64_OPS(or, |=)
^
lib/atomic64.c:121:2: note: expanded from macro 'ATOMIC64_OPS'
ATOMIC64_OP_RETURN(op, c_op) \
^
lib/atomic64.c:82:5: note: expanded from macro 'ATOMIC64_OP_RETURN'
s64 generic_atomic64_##op##_return(s64 a, atomic64_t *v) \
^
<scratch space>:161:1: note: expanded from here
generic_atomic64_or_return
^
lib/atomic64.c:125:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
lib/atomic64.c:121:2: note: expanded from macro 'ATOMIC64_OPS'
ATOMIC64_OP_RETURN(op, c_op) \
^
lib/atomic64.c:81:42: note: expanded from macro 'ATOMIC64_OP_RETURN'
#define ATOMIC64_OP_RETURN(op, c_op) \
^
>> lib/atomic64.c:126:1: warning: no previous prototype for function 'generic_atomic64_xor_return' [-Wmissing-prototypes]
ATOMIC64_OPS(xor, ^=)
^
lib/atomic64.c:121:2: note: expanded from macro 'ATOMIC64_OPS'
ATOMIC64_OP_RETURN(op, c_op) \
^
lib/atomic64.c:82:5: note: expanded from macro 'ATOMIC64_OP_RETURN'
s64 generic_atomic64_##op##_return(s64 a, atomic64_t *v) \
^
<scratch space>:175:1: note: expanded from here
generic_atomic64_xor_return
^
lib/atomic64.c:126:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
lib/atomic64.c:121:2: note: expanded from macro 'ATOMIC64_OPS'
ATOMIC64_OP_RETURN(op, c_op) \
^
lib/atomic64.c:81:42: note: expanded from macro 'ATOMIC64_OP_RETURN'
#define ATOMIC64_OP_RETURN(op, c_op) \
^
3 warnings generated.
vim +/generic_atomic64_and_return +124 lib/atomic64.c
560cb12a4080a4 Peter Zijlstra 2014-04-23 117
560cb12a4080a4 Peter Zijlstra 2014-04-23 118 #undef ATOMIC64_OPS
28aa2bda2211f4 Peter Zijlstra 2016-04-18 119 #define ATOMIC64_OPS(op, c_op) \
28aa2bda2211f4 Peter Zijlstra 2016-04-18 120 ATOMIC64_OP(op, c_op) \
28aa2bda2211f4 Peter Zijlstra 2016-04-18 121 ATOMIC64_OP_RETURN(op, c_op) \
28aa2bda2211f4 Peter Zijlstra 2016-04-18 122 ATOMIC64_FETCH_OP(op, c_op)
28aa2bda2211f4 Peter Zijlstra 2016-04-18 123
28aa2bda2211f4 Peter Zijlstra 2016-04-18 @124 ATOMIC64_OPS(and, &=)
28aa2bda2211f4 Peter Zijlstra 2016-04-18 @125 ATOMIC64_OPS(or, |=)
28aa2bda2211f4 Peter Zijlstra 2016-04-18 @126 ATOMIC64_OPS(xor, ^=)
28aa2bda2211f4 Peter Zijlstra 2016-04-18 127
:::::: The code at line 124 was first introduced by commit
:::::: 28aa2bda2211f4327d83b44a4f917b4a061b1c56 locking/atomic: Implement atomic{,64,_long}_fetch_{add,sub,and,andnot,or,xor}{,_relaxed,_acquire,_release}()
:::::: TO: Peter Zijlstra <peterz@infradead.org>
:::::: CC: Ingo Molnar <mingo@kernel.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: 32319 bytes --]
reply other threads:[~2021-11-11 18:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202111120213.rkw9n6qF-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=mark.rutland@arm.com \
/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
all inboxes | Powered by JetHome®