mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] locking/local_lock: remove unused __spinlock_nested_bh_init()
@ 2026-08-17 13:03 Zhan Xusheng
  2026-08-27 11:06 ` Sebastian Andrzej Siewior
  0 siblings, 1 reply; 2+ messages in thread
From: Zhan Xusheng @ 2026-08-17 13:03 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar
  Cc: Will Deacon, Boqun Feng, Waiman Long, Sebastian Andrzej Siewior,
	zhanxusheng, linux-kernel, Zhan Xusheng

From: Zhan Xusheng <zhanxusheng1024@gmail.com>

From: Zhan Xusheng <zhanxusheng@xiaomi.com>

Added by commit c5bcab755822 ("locking/local_lock: Add local nested BH
locking infrastructure.") and unused since: there is no public wrapper for
it in local_lock.h and no caller, and 'spinlock_nested_bh' appears nowhere
else in the tree.

Signed-off-by: Zhan Xusheng <zhanxusheng@xiaomi.com>
---
 include/linux/local_lock_internal.h | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/include/linux/local_lock_internal.h b/include/linux/local_lock_internal.h
index 234be7f12c15..4cf947ffd02a 100644
--- a/include/linux/local_lock_internal.h
+++ b/include/linux/local_lock_internal.h
@@ -94,17 +94,6 @@ do {								\
 	__local_lock_init((local_lock_t *)lock);		\
 } while (0)
 
-#define __spinlock_nested_bh_init(lock)				\
-do {								\
-	static struct lock_class_key __key;			\
-								\
-	debug_check_no_locks_freed((void *)lock, sizeof(*lock));\
-	lockdep_init_map_type(&(lock)->dep_map, #lock, &__key,  \
-			      0, LD_WAIT_CONFIG, LD_WAIT_INV,	\
-			      LD_LOCK_NORMAL);			\
-	local_lock_debug_init(lock);				\
-} while (0)
-
 #define __local_lock_acquire(lock)					\
 	do {								\
 		local_trylock_t *__tl;					\
-- 
2.43.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] locking/local_lock: remove unused __spinlock_nested_bh_init()
  2026-08-17 13:03 [PATCH] locking/local_lock: remove unused __spinlock_nested_bh_init() Zhan Xusheng
@ 2026-08-27 11:06 ` Sebastian Andrzej Siewior
  0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Andrzej Siewior @ 2026-08-27 11:06 UTC (permalink / raw)
  To: Zhan Xusheng
  Cc: Peter Zijlstra, Ingo Molnar, Will Deacon, Boqun Feng,
	Waiman Long, zhanxusheng, linux-kernel

On 2026-08-17 21:03:54 [+0800], Zhan Xusheng wrote:
> From: Zhan Xusheng <zhanxusheng1024@gmail.com>
> 
> From: Zhan Xusheng <zhanxusheng@xiaomi.com>
> 
> Added by commit c5bcab755822 ("locking/local_lock: Add local nested BH
> locking infrastructure.") and unused since: there is no public wrapper for
> it in local_lock.h and no caller, and 'spinlock_nested_bh' appears nowhere
> else in the tree.
> 
> Signed-off-by: Zhan Xusheng <zhanxusheng@xiaomi.com>

Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>

> --- a/include/linux/local_lock_internal.h
> +++ b/include/linux/local_lock_internal.h
> @@ -94,17 +94,6 @@ do {								\
>  	__local_lock_init((local_lock_t *)lock);		\
>  } while (0)
>  
> -#define __spinlock_nested_bh_init(lock)				\
> -do {								\
> -	static struct lock_class_key __key;			\
> -								\
> -	debug_check_no_locks_freed((void *)lock, sizeof(*lock));\
> -	lockdep_init_map_type(&(lock)->dep_map, #lock, &__key,  \
> -			      0, LD_WAIT_CONFIG, LD_WAIT_INV,	\
> -			      LD_LOCK_NORMAL);			\
> -	local_lock_debug_init(lock);				\
> -} while (0)
> -

This must have been something in-between because it uses LD_LOCK_NORMAL
and it should have been LD_LOCK_PERCPU if intended for this.

>  #define __local_lock_acquire(lock)					\
>  	do {								\
>  		local_trylock_t *__tl;					\

Sebastian

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-08-27 11:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-17 13:03 [PATCH] locking/local_lock: remove unused __spinlock_nested_bh_init() Zhan Xusheng
2026-08-27 11:06 ` Sebastian Andrzej Siewior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®