mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Will Deacon <will.deacon@arm.com>
To: Waiman Long <longman@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH-tip] locking/qspinlock: Remove unnecessary BUG_ON() call
Date: Mon, 25 Feb 2019 12:12:34 +0000	[thread overview]
Message-ID: <20190225121234.GA17076@fuggles.cambridge.arm.com> (raw)
In-Reply-To: <1551057253-3231-1-git-send-email-longman@redhat.com>

On Sun, Feb 24, 2019 at 08:14:13PM -0500, Waiman Long wrote:
> With the > 4 nesting levels case handled by the commit d682b596d993
> ("locking/qspinlock: Handle > 4 slowpath nesting levels"), the BUG_ON()
> call in encode_tail() will never be triggered. Remove it.
> 
> Signed-off-by: Waiman Long <longman@redhat.com>
> ---
>  kernel/locking/qspinlock.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/kernel/locking/qspinlock.c b/kernel/locking/qspinlock.c
> index 21ee51b..5e9247d 100644
> --- a/kernel/locking/qspinlock.c
> +++ b/kernel/locking/qspinlock.c
> @@ -124,9 +124,6 @@ static inline __pure u32 encode_tail(int cpu, int idx)
>  {
>  	u32 tail;
>  
> -#ifdef CONFIG_DEBUG_SPINLOCK
> -	BUG_ON(idx > 3);
> -#endif
>  	tail  = (cpu + 1) << _Q_TAIL_CPU_OFFSET;
>  	tail |= idx << _Q_TAIL_IDX_OFFSET; /* assume < 4 */

Acked-by: Will Deacon <will.deacon@arm.com>

Will

  reply	other threads:[~2019-02-25 12:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-25  1:14 Waiman Long
2019-02-25 12:12 ` Will Deacon [this message]
2019-02-28  7:02 ` [tip:locking/core] " tip-bot for Waiman Long

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=20190225121234.GA17076@fuggles.cambridge.arm.com \
    --to=will.deacon@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    /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

Powered by JetHome