]> Gentwo Git Trees - linux/.git/commit
locking/local_lock: s/l/__l/ and s/tl/__tl/ to reduce the risk of shadowing
authorVincent Mailhol <mailhol@kernel.org>
Thu, 27 Nov 2025 14:41:40 +0000 (15:41 +0100)
committerIngo Molnar <mingo@kernel.org>
Mon, 1 Dec 2025 05:56:16 +0000 (06:56 +0100)
commit719e357fc09c63238956eb7cd546627f9e050640
tree0e5e4e656e0bf61a76ebf5545cfbab16f0e9d1e6
parent52ed746147140e30419ee852c1916531b4ef9b0a
locking/local_lock: s/l/__l/ and s/tl/__tl/ to reduce the risk of shadowing

The Linux kernel coding style advises to avoid common variable
names in function-like macros to reduce the risk of namespace
collisions.

Throughout local_lock_internal.h, several macros use the rather common
variable names 'l' and 'tl'. This already resulted in an actual
collision: the __local_lock_acquire() function like macro is currently
shadowing the parameter 'l' of the:

  class_##_name##_t class_##_name##_constructor(_type *l)

function factory from <linux/cleanup.h>.

Rename the variable 'l' to '__l' and the variable 'tl' to '__tl'
throughout the file to fix the current namespace collision and
to prevent future ones.

[ bigeasy: Rebase, update all l and tl instances in macros ]

Signed-off-by: Vincent Mailhol <mailhol@kernel.org>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Waiman Long <longman@redhat.com>
Link: https://patch.msgid.link/20251127144140.215722-3-bigeasy@linutronix.de
include/linux/local_lock_internal.h