* [paulmckrcu:dev 28/32] kernel/rcu/srcutree.c:795:25: error: passing argument 1 of 'atomic_long_inc' from incompatible pointer type
@ 2024-12-21 18:03 kernel test robot
2024-12-21 18:17 ` Paul E. McKenney
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2024-12-21 18:03 UTC (permalink / raw)
To: Paul E. McKenney; +Cc: oe-kbuild-all
tree: https://github.com/paulmckrcu/linux dev
head: 61a0b92b3a3cfef69e3848806e51d1b99a9e9406
commit: 62986fee7c7a83cb091dca361bcb1ea1b40d4ec4 [28/32] srcu: Pull ->srcu_{un,}lock_count into a new srcu_ctr structure
config: sparc-randconfig-002-20241221 (https://download.01.org/0day-ci/archive/20241222/202412220101.64Tr3TwV-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241222/202412220101.64Tr3TwV-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202412220101.64Tr3TwV-lkp@intel.com/
All errors (new ones prefixed by >>):
kernel/rcu/srcutree.c: In function '__srcu_read_lock_nmisafe':
kernel/rcu/srcutree.c:779:56: error: expected ')' before ']' token
779 | atomic_long_inc(&sdp->srcu_ctrs[idx].srcu_locks]);
| ~ ^
| )
kernel/rcu/srcutree.c:779:56: error: expected ';' before ']' token
779 | atomic_long_inc(&sdp->srcu_ctrs[idx].srcu_locks]);
| ^
| ;
kernel/rcu/srcutree.c:779:56: error: expected statement before ']' token
kernel/rcu/srcutree.c:779:57: error: expected statement before ')' token
779 | atomic_long_inc(&sdp->srcu_ctrs[idx].srcu_locks]);
| ^
kernel/rcu/srcutree.c: In function '__srcu_read_unlock_nmisafe':
>> kernel/rcu/srcutree.c:795:25: error: passing argument 1 of 'atomic_long_inc' from incompatible pointer type [-Wincompatible-pointer-types]
795 | atomic_long_inc(&sdp->srcu_ctrs[idx].srcu_unlocks.counter);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| s64 * {aka long long int *}
In file included from include/linux/atomic.h:82,
from include/asm-generic/bitops/lock.h:5,
from arch/sparc/include/asm/bitops_64.h:52,
from arch/sparc/include/asm/bitops.h:5,
from include/linux/bitops.h:68,
from include/linux/thread_info.h:27,
from arch/sparc/include/asm/current.h:15,
from include/linux/mutex.h:14,
from kernel/rcu/srcutree.c:19:
include/linux/atomic/atomic-instrumented.h:3589:32: note: expected 'atomic_long_t *' {aka 'atomic64_t *'} but argument is of type 's64 *' {aka 'long long int *'}
3589 | atomic_long_inc(atomic_long_t *v)
| ~~~~~~~~~~~~~~~^
vim +/atomic_long_inc +795 kernel/rcu/srcutree.c
784
785 /*
786 * Removes the count for the old reader from the appropriate per-CPU
787 * element of the srcu_struct. Note that this may well be a different
788 * CPU than that which was incremented by the corresponding srcu_read_lock().
789 */
790 void __srcu_read_unlock_nmisafe(struct srcu_struct *ssp, int idx)
791 {
792 struct srcu_data *sdp = raw_cpu_ptr(ssp->sda);
793
794 smp_mb__before_atomic(); /* C */ /* Avoid leaking the critical section. */
> 795 atomic_long_inc(&sdp->srcu_ctrs[idx].srcu_unlocks.counter);
796 }
797 EXPORT_SYMBOL_GPL(__srcu_read_unlock_nmisafe);
798
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [paulmckrcu:dev 28/32] kernel/rcu/srcutree.c:795:25: error: passing argument 1 of 'atomic_long_inc' from incompatible pointer type
2024-12-21 18:03 [paulmckrcu:dev 28/32] kernel/rcu/srcutree.c:795:25: error: passing argument 1 of 'atomic_long_inc' from incompatible pointer type kernel test robot
@ 2024-12-21 18:17 ` Paul E. McKenney
0 siblings, 0 replies; 2+ messages in thread
From: Paul E. McKenney @ 2024-12-21 18:17 UTC (permalink / raw)
To: kernel test robot; +Cc: oe-kbuild-all
On Sun, Dec 22, 2024 at 02:03:25AM +0800, kernel test robot wrote:
> tree: https://github.com/paulmckrcu/linux dev
> head: 61a0b92b3a3cfef69e3848806e51d1b99a9e9406
> commit: 62986fee7c7a83cb091dca361bcb1ea1b40d4ec4 [28/32] srcu: Pull ->srcu_{un,}lock_count into a new srcu_ctr structure
> config: sparc-randconfig-002-20241221 (https://download.01.org/0day-ci/archive/20241222/202412220101.64Tr3TwV-lkp@intel.com/config)
> compiler: sparc64-linux-gcc (GCC) 14.2.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241222/202412220101.64Tr3TwV-lkp@intel.com/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202412220101.64Tr3TwV-lkp@intel.com/
>
> All errors (new ones prefixed by >>):
>
> kernel/rcu/srcutree.c: In function '__srcu_read_lock_nmisafe':
> kernel/rcu/srcutree.c:779:56: error: expected ')' before ']' token
> 779 | atomic_long_inc(&sdp->srcu_ctrs[idx].srcu_locks]);
> | ~ ^
> | )
Good catch! I will fix this on my next rebase with attribution.
Thanx, Paul
> kernel/rcu/srcutree.c:779:56: error: expected ';' before ']' token
> 779 | atomic_long_inc(&sdp->srcu_ctrs[idx].srcu_locks]);
> | ^
> | ;
> kernel/rcu/srcutree.c:779:56: error: expected statement before ']' token
> kernel/rcu/srcutree.c:779:57: error: expected statement before ')' token
> 779 | atomic_long_inc(&sdp->srcu_ctrs[idx].srcu_locks]);
> | ^
> kernel/rcu/srcutree.c: In function '__srcu_read_unlock_nmisafe':
> >> kernel/rcu/srcutree.c:795:25: error: passing argument 1 of 'atomic_long_inc' from incompatible pointer type [-Wincompatible-pointer-types]
> 795 | atomic_long_inc(&sdp->srcu_ctrs[idx].srcu_unlocks.counter);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> | |
> | s64 * {aka long long int *}
> In file included from include/linux/atomic.h:82,
> from include/asm-generic/bitops/lock.h:5,
> from arch/sparc/include/asm/bitops_64.h:52,
> from arch/sparc/include/asm/bitops.h:5,
> from include/linux/bitops.h:68,
> from include/linux/thread_info.h:27,
> from arch/sparc/include/asm/current.h:15,
> from include/linux/mutex.h:14,
> from kernel/rcu/srcutree.c:19:
> include/linux/atomic/atomic-instrumented.h:3589:32: note: expected 'atomic_long_t *' {aka 'atomic64_t *'} but argument is of type 's64 *' {aka 'long long int *'}
> 3589 | atomic_long_inc(atomic_long_t *v)
> | ~~~~~~~~~~~~~~~^
>
>
> vim +/atomic_long_inc +795 kernel/rcu/srcutree.c
>
> 784
> 785 /*
> 786 * Removes the count for the old reader from the appropriate per-CPU
> 787 * element of the srcu_struct. Note that this may well be a different
> 788 * CPU than that which was incremented by the corresponding srcu_read_lock().
> 789 */
> 790 void __srcu_read_unlock_nmisafe(struct srcu_struct *ssp, int idx)
> 791 {
> 792 struct srcu_data *sdp = raw_cpu_ptr(ssp->sda);
> 793
> 794 smp_mb__before_atomic(); /* C */ /* Avoid leaking the critical section. */
> > 795 atomic_long_inc(&sdp->srcu_ctrs[idx].srcu_unlocks.counter);
> 796 }
> 797 EXPORT_SYMBOL_GPL(__srcu_read_unlock_nmisafe);
> 798
>
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-12-21 18:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-21 18:03 [paulmckrcu:dev 28/32] kernel/rcu/srcutree.c:795:25: error: passing argument 1 of 'atomic_long_inc' from incompatible pointer type kernel test robot
2024-12-21 18:17 ` Paul E. McKenney
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.