Skip to content

Commit 2d2f8f0

Browse files
Sebastian Andrzej SiewiorPeter Zijlstra
authored andcommitted
Revert "locking/local_lock: Make the empty local_lock_*() function a macro."
With volatile removed from arch_raw_cpu_ptr() the compiler no longer creates the per-CPU reference. The usage of the macro can be reverted now. Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 1c1e7e3 commit 2d2f8f0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

include/linux/local_lock_internal.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ static inline void local_lock_debug_init(local_lock_t *l)
4444
}
4545
#else /* CONFIG_DEBUG_LOCK_ALLOC */
4646
# define LOCAL_LOCK_DEBUG_INIT(lockname)
47-
# define local_lock_acquire(__ll) do { typecheck(local_lock_t *, __ll); } while (0)
48-
# define local_lock_release(__ll) do { typecheck(local_lock_t *, __ll); } while (0)
49-
# define local_lock_debug_init(__ll) do { typecheck(local_lock_t *, __ll); } while (0)
47+
static inline void local_lock_acquire(local_lock_t *l) { }
48+
static inline void local_lock_release(local_lock_t *l) { }
49+
static inline void local_lock_debug_init(local_lock_t *l) { }
5050
#endif /* !CONFIG_DEBUG_LOCK_ALLOC */
5151

5252
#define INIT_LOCAL_LOCK(lockname) { LOCAL_LOCK_DEBUG_INIT(lockname) }

0 commit comments

Comments
 (0)