All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [kkdwivedi:rqspinlock/bug 1/2] include/linux/atomic/atomic-arch-fallback.h:242:27: error: initialization of 'struct mcs_spinlock **' from incompatible pointer type 'struct mcs_spinlock *'
Date: Thu, 4 Sep 2025 08:07:50 +0800	[thread overview]
Message-ID: <202509040745.Bf5NBwsf-lkp@intel.com> (raw)

tree:   https://github.com/kkdwivedi/linux rqspinlock/bug
head:   7097697299471d7a596f3ed08edc869b8840ba62
commit: d0166ca6f4be3e5a50fa57a221eb2c660083bede [1/2] rqspinlock: Enable timeouts on MCS handover
config: arm64-randconfig-001-20250904 (https://download.01.org/0day-ci/archive/20250904/202509040745.Bf5NBwsf-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250904/202509040745.Bf5NBwsf-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/202509040745.Bf5NBwsf-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from include/linux/atomic.h:80,
                    from include/asm-generic/bitops/atomic.h:5,
                    from arch/arm64/include/asm/bitops.h:25,
                    from include/linux/bitops.h:67,
                    from include/linux/kernel.h:23,
                    from include/linux/cpumask.h:11,
                    from include/linux/smp.h:13,
                    from kernel/bpf/rqspinlock.c:16:
   kernel/bpf/rqspinlock.c: In function 'resilient_queued_spin_lock_slowpath':
>> include/linux/atomic/atomic-arch-fallback.h:242:27: error: initialization of 'struct mcs_spinlock **' from incompatible pointer type 'struct mcs_spinlock *' [-Werror=incompatible-pointer-types]
     typeof(*(_ptr)) *___op = (_oldp), ___o = *___op, ___r; \
                              ^
   include/linux/atomic/atomic-instrumented.h:4908:2: note: in expansion of macro 'raw_try_cmpxchg_relaxed'
     raw_try_cmpxchg_relaxed(__ai_ptr, __ai_oldp, __VA_ARGS__); \
     ^~~~~~~~~~~~~~~~~~~~~~~
   kernel/bpf/rqspinlock.c:541:8: note: in expansion of macro 'try_cmpxchg_relaxed'
      if (!try_cmpxchg_relaxed(&prev->next, RES_NODE_NEXT(lock), node)) {
           ^~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +242 include/linux/atomic/atomic-arch-fallback.h

29f006fdefe6f8 include/linux/atomic-arch-fallback.h        Peter Zijlstra 2020-08-29  234  
9257959a6e5b4f include/linux/atomic/atomic-arch-fallback.h Mark Rutland   2023-06-05  235  #if defined(arch_try_cmpxchg_relaxed)
9257959a6e5b4f include/linux/atomic/atomic-arch-fallback.h Mark Rutland   2023-06-05  236  #define raw_try_cmpxchg_relaxed arch_try_cmpxchg_relaxed
9257959a6e5b4f include/linux/atomic/atomic-arch-fallback.h Mark Rutland   2023-06-05  237  #elif defined(arch_try_cmpxchg)
9257959a6e5b4f include/linux/atomic/atomic-arch-fallback.h Mark Rutland   2023-06-05  238  #define raw_try_cmpxchg_relaxed arch_try_cmpxchg
9257959a6e5b4f include/linux/atomic/atomic-arch-fallback.h Mark Rutland   2023-06-05  239  #else
9257959a6e5b4f include/linux/atomic/atomic-arch-fallback.h Mark Rutland   2023-06-05  240  #define raw_try_cmpxchg_relaxed(_ptr, _oldp, _new) \
29f006fdefe6f8 include/linux/atomic-arch-fallback.h        Peter Zijlstra 2020-08-29  241  ({ \
29f006fdefe6f8 include/linux/atomic-arch-fallback.h        Peter Zijlstra 2020-08-29 @242  	typeof(*(_ptr)) *___op = (_oldp), ___o = *___op, ___r; \
9257959a6e5b4f include/linux/atomic/atomic-arch-fallback.h Mark Rutland   2023-06-05  243  	___r = raw_cmpxchg_relaxed((_ptr), ___o, (_new)); \
29f006fdefe6f8 include/linux/atomic-arch-fallback.h        Peter Zijlstra 2020-08-29  244  	if (unlikely(___r != ___o)) \
29f006fdefe6f8 include/linux/atomic-arch-fallback.h        Peter Zijlstra 2020-08-29  245  		*___op = ___r; \
29f006fdefe6f8 include/linux/atomic-arch-fallback.h        Peter Zijlstra 2020-08-29  246  	likely(___r == ___o); \
29f006fdefe6f8 include/linux/atomic-arch-fallback.h        Peter Zijlstra 2020-08-29  247  })
29f006fdefe6f8 include/linux/atomic-arch-fallback.h        Peter Zijlstra 2020-08-29  248  #endif
29f006fdefe6f8 include/linux/atomic-arch-fallback.h        Peter Zijlstra 2020-08-29  249  

:::::: The code at line 242 was first introduced by commit
:::::: 29f006fdefe6f88abde973a0b0f20d2704e93fd4 asm-generic/atomic: Add try_cmpxchg() fallbacks

:::::: TO: Peter Zijlstra <peterz@infradead.org>
:::::: CC: Ingo Molnar <mingo@kernel.org>

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

                 reply	other threads:[~2025-09-04  0:09 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=202509040745.Bf5NBwsf-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=memxor@gmail.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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.