aboutsummaryrefslogtreecommitdiff
path: root/tools/lib/api/debug.c
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2024-09-12 15:39:55 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-09-13 07:36:02 +0200
commite837d833a13461c10f265a65ce6612e6dd43e76f (patch)
tree30aabfca8acbe44a18ef0a6cb71e71022843d93c /tools/lib/api/debug.c
parent96f8052822e03c6f49b6b28fc1d6e5e0522ecbb9 (diff)
locking/mutex: Introduce mutex_init_with_key()
The following pattern occurs 5 times in kernel drivers: lockdep_register_key(key); __mutex_init(mutex, name, key); In several cases the 'name' argument matches #mutex. Hence, introduce the mutex_init_with_key() macro. This macro derives the 'name' argument from the 'mutex' argument. Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@kernel.org> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20240912223956.3554086-3-bvanassche@acm.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/lib/api/debug.c')
0 files changed, 0 insertions, 0 deletions