All of lore.kernel.org
 help / color / mirror / Atom feed
* [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 *'
@ 2025-09-04  0:07 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-09-04  0:07 UTC (permalink / raw)
  To: Kumar Kartikeya Dwivedi; +Cc: oe-kbuild-all

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

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

only message in thread, other threads:[~2025-09-04  0:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-04  0:07 [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 *' 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.