locking/qspinlock: Remove unnecessary BUG_ON() call
Waiman Long
reviewerWith 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 <[email protected]>
--- kernel/locking/qspinlock.c | 3 --- 1 file changed, 3 deletions(-)
kernel/locking/qspinlock.c +0 -3
@@ -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 */
Signature · 1 line
1.8.3.1
Will Deacon
Acked-byQuoted 14 lines · Waiman Long
With the > 4 nesting levels case handled by the commit
d682b596d993("locking/qspinlock: Handle > 4 slowpath nesting levels"), theBUG_ON()call inencode_tail()will never be triggered. Remove it.Signed-off-by Waiman Long <[email protected]>--- kernel/locking/qspinlock.c | 3 --- 1 file changed, 3 deletions(-)kernel/locking/qspinlock.c +0
-0
kernel/locking/qspinlock.c static inline __pure u32 encode_tail(int cpu, int idx) · line 128
Quoted 8 lines
kernel/locking/qspinlock.c +0
-3@@ -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 <[email protected]>
Will
tip-bot for Waiman Long
merge botlocking/qspinlock: Remove unnecessary BUG_ON() call
Commit-ID: 733000c7ffd9d9c8c4fdfd82f0d41956c8cf0537 Gitweb: https://git.kernel.org/tip/733000c7ffd9d9c8c4fdfd82f0d41956c8cf0537 Author: Waiman Long <[email protected]> AuthorDate: Sun, 24 Feb 2019 20:14:13 -0500 Committer: Ingo Molnar <[email protected]> CommitDate: Thu, 28 Feb 2019 07:55:38 +0100
locking/qspinlock: Remove unnecessary BUG_ON() call
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 actually be triggered.
Remove it.
Signed-off-by Waiman Long <[email protected]>
Signed-off-by Peter Zijlstra (Intel) <[email protected]>
Acked-by Will Deacon <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Paul E. McKenney <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Thomas Gleixner <[email protected]>
Signed-off-by Ingo Molnar <[email protected]>
--- kernel/locking/qspinlock.c | 3 --- 1 file changed, 3 deletions(-)
kernel/locking/qspinlock.c +0 -3
@@ -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 */