All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Paul E. McKenney" <paulmck@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [paulmckrcu:dev 28/32] kernel/rcu/srcutree.c:795:25: error: passing argument 1 of 'atomic_long_inc' from incompatible pointer type
Date: Sun, 22 Dec 2024 02:03:25 +0800	[thread overview]
Message-ID: <202412220101.64Tr3TwV-lkp@intel.com> (raw)

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

             reply	other threads:[~2024-12-21 18:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-21 18:03 kernel test robot [this message]
2024-12-21 18:17 ` [paulmckrcu:dev 28/32] kernel/rcu/srcutree.c:795:25: error: passing argument 1 of 'atomic_long_inc' from incompatible pointer type Paul E. McKenney

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=202412220101.64Tr3TwV-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=paulmck@kernel.org \
    /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 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.