mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Zhan Xusheng <zhanxusheng1024@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>, Will Deacon <will@kernel.org>,
	Boqun Feng <boqun@kernel.org>, Waiman Long <longman@redhat.com>,
	zhanxusheng@xiaomi.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] locking/local_lock: remove unused __spinlock_nested_bh_init()
Date: Thu, 27 Aug 2026 13:06:52 +0200	[thread overview]
Message-ID: <20260827110652.esUM7hmc@linutronix.de> (raw)
In-Reply-To: <20260817130354.4024582-1-zhanxusheng@xiaomi.com>

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

      reply	other threads:[~2026-08-27 11:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-17 13:03 Zhan Xusheng
2026-08-27 11:06 ` Sebastian Andrzej Siewior [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260827110652.esUM7hmc@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=boqun@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=will@kernel.org \
    --cc=zhanxusheng1024@gmail.com \
    --cc=zhanxusheng@xiaomi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®