Commit 14de1552 authored by Bart Van Assche's avatar Bart Van Assche Committed by Peter Zijlstra
Browse files

include/linux/local_lock_internal.h: Make this header file again compatible with sparse

There are two versions of the __this_cpu_local_lock() definitions in
include/linux/local_lock_internal.h: one version that relies on the
Clang overloading functionality and another version that does not.
Select the latter version when using sparse. This patch fixes the
following errors reported by sparse:

   include/linux/local_lock_internal.h:331:40: sparse: sparse: multiple definitions for function '__this_cpu_local_lock'
   include/linux/local_lock_internal.h:325:37: sparse:  the previous one is here

Closes: https://lore.kernel.org/oe-kbuild-all/202603062334.wgI5htP0-lkp@intel.com/


Fixes: d3febf16 ("locking/local_lock: Support Clang's context analysis")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: default avatarMarco Elver <elver@google.com>
Link: https://patch.msgid.link/20260311231455.1961413-1-bvanassche@acm.org
parent 1f318b96
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -315,7 +315,7 @@ do { \

#endif /* CONFIG_PREEMPT_RT */

#if defined(WARN_CONTEXT_ANALYSIS)
#if defined(WARN_CONTEXT_ANALYSIS) && !defined(__CHECKER__)
/*
 * Because the compiler only knows about the base per-CPU variable, use this
 * helper function to make the compiler think we lock/unlock the @base variable,