All of lore.kernel.org
 help / color / mirror / Atom feed
* [paulmckrcu:dev 29/32] kernel/rcu/srcutree.c:779:46: error: 'idx' undeclared; did you mean 'ida'?
@ 2024-12-21 18:56 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-12-21 18:56 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: oe-kbuild-all

tree:   https://github.com/paulmckrcu/linux dev
head:   61a0b92b3a3cfef69e3848806e51d1b99a9e9406
commit: 2d83ec26a0f96c719fdc81b54f75d7b924dcd6bf [29/32] srcu: Make SRCU readers use ->srcu_ctrs for counter selection
config: sparc-randconfig-002-20241221 (https://download.01.org/0day-ci/archive/20241222/202412220224.7NlsDpAF-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/202412220224.7NlsDpAF-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/202412220224.7NlsDpAF-lkp@intel.com/

All errors (new ones prefixed by >>):

   kernel/rcu/srcutree.c: In function '__srcu_read_lock_nmisafe':
>> kernel/rcu/srcutree.c:779:46: error: 'idx' undeclared (first use in this function); did you mean 'ida'?
     779 |         atomic_long_inc(&ssp->sda->srcu_ctrs[idx].srcu_locks.counter);
         |                                              ^~~
         |                                              ida
   kernel/rcu/srcutree.c:779:46: note: each undeclared identifier is reported only once for each function it appears in
   kernel/rcu/srcutree.c:777:27: warning: unused variable 'sdp' [-Wunused-variable]
     777 |         struct srcu_data *sdp = raw_cpu_ptr(ssp->sda);
         |                           ^~~
   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 +779 kernel/rcu/srcutree.c

   768	
   769	/*
   770	 * Counts the new reader in the appropriate per-CPU element of the
   771	 * srcu_struct, but in an NMI-safe manner using RMW atomics.
   772	 * Returns an index that must be passed to the matching srcu_read_unlock().
   773	 */
   774	int __srcu_read_lock_nmisafe(struct srcu_struct *ssp)
   775	{
   776		struct srcu_ctr *scp = READ_ONCE(ssp->srcu_ctrp);
   777		struct srcu_data *sdp = raw_cpu_ptr(ssp->sda);
   778	
 > 779		atomic_long_inc(&ssp->sda->srcu_ctrs[idx].srcu_locks.counter);
   780		smp_mb__after_atomic(); /* B */  /* Avoid leaking the critical section. */
   781		return scp - &ssp->sda->srcu_ctrs[0];
   782	}
   783	EXPORT_SYMBOL_GPL(__srcu_read_lock_nmisafe);
   784	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-12-21 18:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-21 18:56 [paulmckrcu:dev 29/32] kernel/rcu/srcutree.c:779:46: error: 'idx' undeclared; did you mean 'ida'? kernel test robot

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.