Skip to content

Commit 733000c

Browse files
Waiman-Longingomolnar
authored andcommitted
locking/qspinlock: Remove unnecessary BUG_ON() call
With the > 4 nesting levels case handled by the commit: d682b59 ("locking/qspinlock: Handle > 4 slowpath nesting levels") the BUG_ON() call in encode_tail() will never actually be triggered. Remove it. Signed-off-by: Waiman Long <longman@redhat.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Will Deacon <will.deacon@arm.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: https://lkml.kernel.org/r/1551057253-3231-1-git-send-email-longman@redhat.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent 02e525b commit 733000c

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

‎kernel/locking/qspinlock.c‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,6 @@ static inline __pure u32 encode_tail(int cpu, int idx)
124124
{
125125
u32 tail;
126126

127-
#ifdef CONFIG_DEBUG_SPINLOCK
128-
BUG_ON(idx > 3);
129-
#endif
130127
tail = (cpu + 1) << _Q_TAIL_CPU_OFFSET;
131128
tail |= idx << _Q_TAIL_IDX_OFFSET; /* assume < 4 */
132129

0 commit comments

Comments
 (0)