* lib/atomic64.c:82:5: warning: no previous prototype for 'generic_atomic64_and_return'
@ 2021-11-11 23:08 ` kernel test robot
0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2021-11-11 23:08 UTC (permalink / raw)
To: Mark Rutland; +Cc: kbuild-all, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 3481 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: arc-randconfig-r032-20211109 (attached as .config)
compiler: arc-elf-gcc (GCC) 11.2.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
# 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=gcc-11.2.0 make.cross ARCH=arc
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:82:5: warning: no previous prototype for 'generic_atomic64_and_return' [-Wmissing-prototypes]
82 | s64 generic_atomic64_##op##_return(s64 a, atomic64_t *v) \
| ^~~~~~~~~~~~~~~~~
lib/atomic64.c:121:9: note: in expansion of macro 'ATOMIC64_OP_RETURN'
121 | ATOMIC64_OP_RETURN(op, c_op) \
| ^~~~~~~~~~~~~~~~~~
lib/atomic64.c:124:1: note: in expansion of macro 'ATOMIC64_OPS'
124 | ATOMIC64_OPS(and, &=)
| ^~~~~~~~~~~~
>> lib/atomic64.c:82:5: warning: no previous prototype for 'generic_atomic64_or_return' [-Wmissing-prototypes]
82 | s64 generic_atomic64_##op##_return(s64 a, atomic64_t *v) \
| ^~~~~~~~~~~~~~~~~
lib/atomic64.c:121:9: note: in expansion of macro 'ATOMIC64_OP_RETURN'
121 | ATOMIC64_OP_RETURN(op, c_op) \
| ^~~~~~~~~~~~~~~~~~
lib/atomic64.c:125:1: note: in expansion of macro 'ATOMIC64_OPS'
125 | ATOMIC64_OPS(or, |=)
| ^~~~~~~~~~~~
>> lib/atomic64.c:82:5: warning: no previous prototype for 'generic_atomic64_xor_return' [-Wmissing-prototypes]
82 | s64 generic_atomic64_##op##_return(s64 a, atomic64_t *v) \
| ^~~~~~~~~~~~~~~~~
lib/atomic64.c:121:9: note: in expansion of macro 'ATOMIC64_OP_RETURN'
121 | ATOMIC64_OP_RETURN(op, c_op) \
| ^~~~~~~~~~~~~~~~~~
lib/atomic64.c:126:1: note: in expansion of macro 'ATOMIC64_OPS'
126 | ATOMIC64_OPS(xor, ^=)
| ^~~~~~~~~~~~
vim +/generic_atomic64_and_return +82 lib/atomic64.c
80
81 #define ATOMIC64_OP_RETURN(op, c_op) \
> 82 s64 generic_atomic64_##op##_return(s64 a, atomic64_t *v) \
83 { \
84 unsigned long flags; \
85 raw_spinlock_t *lock = lock_addr(v); \
86 s64 val; \
87 \
88 raw_spin_lock_irqsave(lock, flags); \
89 val = (v->counter c_op a); \
90 raw_spin_unlock_irqrestore(lock, flags); \
91 return val; \
92 } \
93 EXPORT_SYMBOL(generic_atomic64_##op##_return);
94
---
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: 35264 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* lib/atomic64.c:82:5: warning: no previous prototype for 'generic_atomic64_and_return'
@ 2021-11-11 23:08 ` kernel test robot
0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2021-11-11 23:08 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 3554 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: arc-randconfig-r032-20211109 (attached as .config)
compiler: arc-elf-gcc (GCC) 11.2.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
# 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=gcc-11.2.0 make.cross ARCH=arc
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:82:5: warning: no previous prototype for 'generic_atomic64_and_return' [-Wmissing-prototypes]
82 | s64 generic_atomic64_##op##_return(s64 a, atomic64_t *v) \
| ^~~~~~~~~~~~~~~~~
lib/atomic64.c:121:9: note: in expansion of macro 'ATOMIC64_OP_RETURN'
121 | ATOMIC64_OP_RETURN(op, c_op) \
| ^~~~~~~~~~~~~~~~~~
lib/atomic64.c:124:1: note: in expansion of macro 'ATOMIC64_OPS'
124 | ATOMIC64_OPS(and, &=)
| ^~~~~~~~~~~~
>> lib/atomic64.c:82:5: warning: no previous prototype for 'generic_atomic64_or_return' [-Wmissing-prototypes]
82 | s64 generic_atomic64_##op##_return(s64 a, atomic64_t *v) \
| ^~~~~~~~~~~~~~~~~
lib/atomic64.c:121:9: note: in expansion of macro 'ATOMIC64_OP_RETURN'
121 | ATOMIC64_OP_RETURN(op, c_op) \
| ^~~~~~~~~~~~~~~~~~
lib/atomic64.c:125:1: note: in expansion of macro 'ATOMIC64_OPS'
125 | ATOMIC64_OPS(or, |=)
| ^~~~~~~~~~~~
>> lib/atomic64.c:82:5: warning: no previous prototype for 'generic_atomic64_xor_return' [-Wmissing-prototypes]
82 | s64 generic_atomic64_##op##_return(s64 a, atomic64_t *v) \
| ^~~~~~~~~~~~~~~~~
lib/atomic64.c:121:9: note: in expansion of macro 'ATOMIC64_OP_RETURN'
121 | ATOMIC64_OP_RETURN(op, c_op) \
| ^~~~~~~~~~~~~~~~~~
lib/atomic64.c:126:1: note: in expansion of macro 'ATOMIC64_OPS'
126 | ATOMIC64_OPS(xor, ^=)
| ^~~~~~~~~~~~
vim +/generic_atomic64_and_return +82 lib/atomic64.c
80
81 #define ATOMIC64_OP_RETURN(op, c_op) \
> 82 s64 generic_atomic64_##op##_return(s64 a, atomic64_t *v) \
83 { \
84 unsigned long flags; \
85 raw_spinlock_t *lock = lock_addr(v); \
86 s64 val; \
87 \
88 raw_spin_lock_irqsave(lock, flags); \
89 val = (v->counter c_op a); \
90 raw_spin_unlock_irqrestore(lock, flags); \
91 return val; \
92 } \
93 EXPORT_SYMBOL(generic_atomic64_##op##_return);
94
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 35264 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: lib/atomic64.c:82:5: warning: no previous prototype for 'generic_atomic64_and_return'
2021-11-11 23:08 ` kernel test robot
@ 2021-11-26 11:47 ` Mark Rutland
-1 siblings, 0 replies; 6+ messages in thread
From: Mark Rutland @ 2021-11-26 11:47 UTC (permalink / raw)
To: kernel test robot; +Cc: kbuild-all, linux-kernel, Peter Zijlstra
On Fri, Nov 12, 2021 at 07:08:19AM +0800, kernel test robot wrote:
> 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: arc-randconfig-r032-20211109 (attached as .config)
> compiler: arc-elf-gcc (GCC) 11.2.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
> # 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=gcc-11.2.0 make.cross ARCH=arc
>
> 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:82:5: warning: no previous prototype for 'generic_atomic64_and_return' [-Wmissing-prototypes]
> >> lib/atomic64.c:82:5: warning: no previous prototype for 'generic_atomic64_or_return' [-Wmissing-prototypes]
> >> lib/atomic64.c:82:5: warning: no previous prototype for 'generic_atomic64_xor_return' [-Wmissing-prototypes]
Ah, there are not meant to be return forms of the and/or/xor operations, so
we're pointlessly building code that cannot be used (but this is not otherwise
harmful).
That said, I think this is nothing to do with commit:
1bdadf46eff6804a ("locking/atomic: atomic64: support ARCH_ATOMIC")
... and is in fact a latent issue introduced by commit:
28aa2bda2211f432 ("locking/atomic: Implement atomic{,64,_long}_fetch_{add,sub,and,andnot,or,xor}{,_relaxed,_acquire,_release}()")
... where we accidentally left the:
ATOMIC64_OP_RETURN(op, c_op)
... line for the and/or/xor atomics, even though that wasn't necessary.
This is trivial to avoid, so I'll send a patch shortly.
Thanks,
Mark.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: lib/atomic64.c:82:5: warning: no previous prototype for 'generic_atomic64_and_return'
@ 2021-11-26 11:47 ` Mark Rutland
0 siblings, 0 replies; 6+ messages in thread
From: Mark Rutland @ 2021-11-26 11:47 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2326 bytes --]
On Fri, Nov 12, 2021 at 07:08:19AM +0800, kernel test robot wrote:
> 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: arc-randconfig-r032-20211109 (attached as .config)
> compiler: arc-elf-gcc (GCC) 11.2.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
> # 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=gcc-11.2.0 make.cross ARCH=arc
>
> 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:82:5: warning: no previous prototype for 'generic_atomic64_and_return' [-Wmissing-prototypes]
> >> lib/atomic64.c:82:5: warning: no previous prototype for 'generic_atomic64_or_return' [-Wmissing-prototypes]
> >> lib/atomic64.c:82:5: warning: no previous prototype for 'generic_atomic64_xor_return' [-Wmissing-prototypes]
Ah, there are not meant to be return forms of the and/or/xor operations, so
we're pointlessly building code that cannot be used (but this is not otherwise
harmful).
That said, I think this is nothing to do with commit:
1bdadf46eff6804a ("locking/atomic: atomic64: support ARCH_ATOMIC")
... and is in fact a latent issue introduced by commit:
28aa2bda2211f432 ("locking/atomic: Implement atomic{,64,_long}_fetch_{add,sub,and,andnot,or,xor}{,_relaxed,_acquire,_release}()")
... where we accidentally left the:
ATOMIC64_OP_RETURN(op, c_op)
... line for the and/or/xor atomics, even though that wasn't necessary.
This is trivial to avoid, so I'll send a patch shortly.
Thanks,
Mark.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [kbuild-all] Re: lib/atomic64.c:82:5: warning: no previous prototype for 'generic_atomic64_and_return'
2021-11-26 11:47 ` Mark Rutland
@ 2021-12-06 2:24 ` Rong Chen
-1 siblings, 0 replies; 6+ messages in thread
From: Rong Chen @ 2021-12-06 2:24 UTC (permalink / raw)
To: Mark Rutland, kernel test robot; +Cc: kbuild-all, linux-kernel, Peter Zijlstra
On 11/26/21 19:47, Mark Rutland wrote:
> On Fri, Nov 12, 2021 at 07:08:19AM +0800, kernel test robot wrote:
>> 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: arc-randconfig-r032-20211109 (attached as .config)
>> compiler: arc-elf-gcc (GCC) 11.2.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
>> # 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=gcc-11.2.0 make.cross ARCH=arc
>>
>> 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:82:5: warning: no previous prototype for 'generic_atomic64_and_return' [-Wmissing-prototypes]
>>>> lib/atomic64.c:82:5: warning: no previous prototype for 'generic_atomic64_or_return' [-Wmissing-prototypes]
>>>> lib/atomic64.c:82:5: warning: no previous prototype for 'generic_atomic64_xor_return' [-Wmissing-prototypes]
> Ah, there are not meant to be return forms of the and/or/xor operations, so
> we're pointlessly building code that cannot be used (but this is not otherwise
> harmful).
>
> That said, I think this is nothing to do with commit:
>
> 1bdadf46eff6804a ("locking/atomic: atomic64: support ARCH_ATOMIC")
>
> ... and is in fact a latent issue introduced by commit:
>
> 28aa2bda2211f432 ("locking/atomic: Implement atomic{,64,_long}_fetch_{add,sub,and,andnot,or,xor}{,_relaxed,_acquire,_release}()")
>
> ... where we accidentally left the:
>
> ATOMIC64_OP_RETURN(op, c_op)
>
> ... line for the and/or/xor atomics, even though that wasn't necessary.
>
> This is trivial to avoid, so I'll send a patch shortly.
>
> Thanks,
> Mark.
Hi Mark,
Thanks for the fix, the bot can't always find the first introduced
commit with the bisection method.
Best Regards,
Rong Chen
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: lib/atomic64.c:82:5: warning: no previous prototype for 'generic_atomic64_and_return'
@ 2021-12-06 2:24 ` Rong Chen
0 siblings, 0 replies; 6+ messages in thread
From: Rong Chen @ 2021-12-06 2:24 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2573 bytes --]
On 11/26/21 19:47, Mark Rutland wrote:
> On Fri, Nov 12, 2021 at 07:08:19AM +0800, kernel test robot wrote:
>> 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: arc-randconfig-r032-20211109 (attached as .config)
>> compiler: arc-elf-gcc (GCC) 11.2.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
>> # 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=gcc-11.2.0 make.cross ARCH=arc
>>
>> 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:82:5: warning: no previous prototype for 'generic_atomic64_and_return' [-Wmissing-prototypes]
>>>> lib/atomic64.c:82:5: warning: no previous prototype for 'generic_atomic64_or_return' [-Wmissing-prototypes]
>>>> lib/atomic64.c:82:5: warning: no previous prototype for 'generic_atomic64_xor_return' [-Wmissing-prototypes]
> Ah, there are not meant to be return forms of the and/or/xor operations, so
> we're pointlessly building code that cannot be used (but this is not otherwise
> harmful).
>
> That said, I think this is nothing to do with commit:
>
> 1bdadf46eff6804a ("locking/atomic: atomic64: support ARCH_ATOMIC")
>
> ... and is in fact a latent issue introduced by commit:
>
> 28aa2bda2211f432 ("locking/atomic: Implement atomic{,64,_long}_fetch_{add,sub,and,andnot,or,xor}{,_relaxed,_acquire,_release}()")
>
> ... where we accidentally left the:
>
> ATOMIC64_OP_RETURN(op, c_op)
>
> ... line for the and/or/xor atomics, even though that wasn't necessary.
>
> This is trivial to avoid, so I'll send a patch shortly.
>
> Thanks,
> Mark.
Hi Mark,
Thanks for the fix, the bot can't always find the first introduced
commit with the bisection method.
Best Regards,
Rong Chen
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-12-06 2:24 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-11 23:08 lib/atomic64.c:82:5: warning: no previous prototype for 'generic_atomic64_and_return' kernel test robot
2021-11-11 23:08 ` kernel test robot
2021-11-26 11:47 ` Mark Rutland
2021-11-26 11:47 ` Mark Rutland
2021-12-06 2:24 ` [kbuild-all] " Rong Chen
2021-12-06 2:24 ` Rong Chen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.