[PATCH 1/3] locking/mutex: Rename mutex_init_lockep()

Davidlohr Bueso posted 3 patches 1 month, 2 weeks ago
[PATCH 1/3] locking/mutex: Rename mutex_init_lockep()
Posted by Davidlohr Bueso 1 month, 2 weeks ago
Typo, this wants to be _lockdep().

Fixes: 51d7a054521d ("locking/mutex: Redo __mutex_init() to reduce generated code size")
Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
---
 include/linux/mutex.h  | 4 ++--
 kernel/locking/mutex.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/linux/mutex.h b/include/linux/mutex.h
index ecaa0440f6ec..8126da959088 100644
--- a/include/linux/mutex.h
+++ b/include/linux/mutex.h
@@ -87,12 +87,12 @@ do {									\
 	struct mutex mutexname = __MUTEX_INITIALIZER(mutexname)
 
 #ifdef CONFIG_DEBUG_LOCK_ALLOC
-void mutex_init_lockep(struct mutex *lock, const char *name, struct lock_class_key *key);
+void mutex_init_lockdep(struct mutex *lock, const char *name, struct lock_class_key *key);
 
 static inline void __mutex_init(struct mutex *lock, const char *name,
 				struct lock_class_key *key)
 {
-	mutex_init_lockep(lock, name, key);
+	mutex_init_lockdep(lock, name, key);
 }
 #else
 extern void mutex_init_generic(struct mutex *lock);
diff --git a/kernel/locking/mutex.c b/kernel/locking/mutex.c
index 2a1d165b3167..c867f6c15530 100644
--- a/kernel/locking/mutex.c
+++ b/kernel/locking/mutex.c
@@ -171,7 +171,7 @@ static __always_inline bool __mutex_unlock_fast(struct mutex *lock)
 
 #else /* !CONFIG_DEBUG_LOCK_ALLOC */
 
-void mutex_init_lockep(struct mutex *lock, const char *name, struct lock_class_key *key)
+void mutex_init_lockdep(struct mutex *lock, const char *name, struct lock_class_key *key)
 {
 	__mutex_init_generic(lock);
 
@@ -181,7 +181,7 @@ void mutex_init_lockep(struct mutex *lock, const char *name, struct lock_class_k
 	debug_check_no_locks_freed((void *)lock, sizeof(*lock));
 	lockdep_init_map_wait(&lock->dep_map, name, key, 0, LD_WAIT_SLEEP);
 }
-EXPORT_SYMBOL(mutex_init_lockep);
+EXPORT_SYMBOL(mutex_init_lockdep);
 #endif /* !CONFIG_DEBUG_LOCK_ALLOC */
 
 static inline void __mutex_set_flag(struct mutex *lock, unsigned long flag)
-- 
2.39.5
Re: [PATCH 1/3] locking/mutex: Rename mutex_init_lockep()
Posted by Waiman Long 1 month, 1 week ago
On 2/17/26 2:15 PM, Davidlohr Bueso wrote:
> Typo, this wants to be _lockdep().
>
> Fixes: 51d7a054521d ("locking/mutex: Redo __mutex_init() to reduce generated code size")
> Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
> ---
>   include/linux/mutex.h  | 4 ++--
>   kernel/locking/mutex.c | 4 ++--
>   2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/include/linux/mutex.h b/include/linux/mutex.h
> index ecaa0440f6ec..8126da959088 100644
> --- a/include/linux/mutex.h
> +++ b/include/linux/mutex.h
> @@ -87,12 +87,12 @@ do {									\
>   	struct mutex mutexname = __MUTEX_INITIALIZER(mutexname)
>   
>   #ifdef CONFIG_DEBUG_LOCK_ALLOC
> -void mutex_init_lockep(struct mutex *lock, const char *name, struct lock_class_key *key);
> +void mutex_init_lockdep(struct mutex *lock, const char *name, struct lock_class_key *key);
>   
>   static inline void __mutex_init(struct mutex *lock, const char *name,
>   				struct lock_class_key *key)
>   {
> -	mutex_init_lockep(lock, name, key);
> +	mutex_init_lockdep(lock, name, key);
>   }
>   #else
>   extern void mutex_init_generic(struct mutex *lock);
> diff --git a/kernel/locking/mutex.c b/kernel/locking/mutex.c
> index 2a1d165b3167..c867f6c15530 100644
> --- a/kernel/locking/mutex.c
> +++ b/kernel/locking/mutex.c
> @@ -171,7 +171,7 @@ static __always_inline bool __mutex_unlock_fast(struct mutex *lock)
>   
>   #else /* !CONFIG_DEBUG_LOCK_ALLOC */
>   
> -void mutex_init_lockep(struct mutex *lock, const char *name, struct lock_class_key *key)
> +void mutex_init_lockdep(struct mutex *lock, const char *name, struct lock_class_key *key)
>   {
>   	__mutex_init_generic(lock);
>   
> @@ -181,7 +181,7 @@ void mutex_init_lockep(struct mutex *lock, const char *name, struct lock_class_k
>   	debug_check_no_locks_freed((void *)lock, sizeof(*lock));
>   	lockdep_init_map_wait(&lock->dep_map, name, key, 0, LD_WAIT_SLEEP);
>   }
> -EXPORT_SYMBOL(mutex_init_lockep);
> +EXPORT_SYMBOL(mutex_init_lockdep);
>   #endif /* !CONFIG_DEBUG_LOCK_ALLOC */
>   
>   static inline void __mutex_set_flag(struct mutex *lock, unsigned long flag)

Yes, this typo can be easy to miss.

Acked-by: Waiman Long <longman@redhat.com>
Re: [PATCH 1/3] locking/mutex: Rename mutex_init_lockep()
Posted by Peter Zijlstra 1 month, 1 week ago
On Tue, Feb 17, 2026 at 11:15:10AM -0800, Davidlohr Bueso wrote:
> Typo, this wants to be _lockdep().

Lol... I *never* saw that until just now.

Reading is hard I suppose :-)
[tip: locking/core] locking/mutex: Rename mutex_init_lockep()
Posted by tip-bot2 for Davidlohr Bueso 1 month, 1 week ago
The following commit has been merged into the locking/core branch of tip:

Commit-ID:     8b65eb52d93e4e496bd26e6867152344554eb39e
Gitweb:        https://git.kernel.org/tip/8b65eb52d93e4e496bd26e6867152344554eb39e
Author:        Davidlohr Bueso <dave@stgolabs.net>
AuthorDate:    Tue, 17 Feb 2026 11:15:10 -08:00
Committer:     Peter Zijlstra <peterz@infradead.org>
CommitterDate: Mon, 23 Feb 2026 11:19:15 +01:00

locking/mutex: Rename mutex_init_lockep()

Typo, this wants to be _lockdep().

Fixes: 51d7a054521d ("locking/mutex: Redo __mutex_init() to reduce generated code size")
Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20260217191512.1180151-2-dave@stgolabs.net
---
 include/linux/mutex.h  | 4 ++--
 kernel/locking/mutex.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/linux/mutex.h b/include/linux/mutex.h
index ecaa044..8126da9 100644
--- a/include/linux/mutex.h
+++ b/include/linux/mutex.h
@@ -87,12 +87,12 @@ do {									\
 	struct mutex mutexname = __MUTEX_INITIALIZER(mutexname)
 
 #ifdef CONFIG_DEBUG_LOCK_ALLOC
-void mutex_init_lockep(struct mutex *lock, const char *name, struct lock_class_key *key);
+void mutex_init_lockdep(struct mutex *lock, const char *name, struct lock_class_key *key);
 
 static inline void __mutex_init(struct mutex *lock, const char *name,
 				struct lock_class_key *key)
 {
-	mutex_init_lockep(lock, name, key);
+	mutex_init_lockdep(lock, name, key);
 }
 #else
 extern void mutex_init_generic(struct mutex *lock);
diff --git a/kernel/locking/mutex.c b/kernel/locking/mutex.c
index 2a1d165..c867f6c 100644
--- a/kernel/locking/mutex.c
+++ b/kernel/locking/mutex.c
@@ -171,7 +171,7 @@ static __always_inline bool __mutex_unlock_fast(struct mutex *lock)
 
 #else /* !CONFIG_DEBUG_LOCK_ALLOC */
 
-void mutex_init_lockep(struct mutex *lock, const char *name, struct lock_class_key *key)
+void mutex_init_lockdep(struct mutex *lock, const char *name, struct lock_class_key *key)
 {
 	__mutex_init_generic(lock);
 
@@ -181,7 +181,7 @@ void mutex_init_lockep(struct mutex *lock, const char *name, struct lock_class_k
 	debug_check_no_locks_freed((void *)lock, sizeof(*lock));
 	lockdep_init_map_wait(&lock->dep_map, name, key, 0, LD_WAIT_SLEEP);
 }
-EXPORT_SYMBOL(mutex_init_lockep);
+EXPORT_SYMBOL(mutex_init_lockdep);
 #endif /* !CONFIG_DEBUG_LOCK_ALLOC */
 
 static inline void __mutex_set_flag(struct mutex *lock, unsigned long flag)