Skip to content

Commit 14de155

Browse files
bvanasschePeter Zijlstra
authored andcommitted
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/[email protected]/ Fixes: d3febf1 ("locking/local_lock: Support Clang's context analysis") Reported-by: kernel test robot <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Reviewed-by: Marco Elver <[email protected]> Link: https://patch.msgid.link/[email protected]
1 parent 1f318b9 commit 14de155

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

include/linux/local_lock_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ do { \
315315

316316
#endif /* CONFIG_PREEMPT_RT */
317317

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

0 commit comments

Comments
 (0)