Skip to content

Commit 4e4bea7

Browse files
committed
rcu: Remove typecheck() from RCU locking wrapper functions
Because raw_spin_lock_irqsave() and raw_spin_unlock_irqrestore() both do typecheck() on their flags argument, there is no point in duplicating this check in raw_spin_lock_irqsave_rcu_node() and raw_spin_unlock_irqrestore_rcu_node(). This commit therefore saves a few lines by removing this duplicated check. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
1 parent d2b1654 commit 4e4bea7

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

‎kernel/rcu/rcu.h‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -334,18 +334,14 @@ do { \
334334
#define raw_spin_unlock_irq_rcu_node(p) \
335335
raw_spin_unlock_irq(&ACCESS_PRIVATE(p, lock))
336336

337-
#define raw_spin_lock_irqsave_rcu_node(rnp, flags) \
337+
#define raw_spin_lock_irqsave_rcu_node(p, flags) \
338338
do { \
339-
typecheck(unsigned long, flags); \
340-
raw_spin_lock_irqsave(&ACCESS_PRIVATE(rnp, lock), flags); \
339+
raw_spin_lock_irqsave(&ACCESS_PRIVATE(p, lock), flags); \
341340
smp_mb__after_unlock_lock(); \
342341
} while (0)
343342

344-
#define raw_spin_unlock_irqrestore_rcu_node(rnp, flags) \
345-
do { \
346-
typecheck(unsigned long, flags); \
347-
raw_spin_unlock_irqrestore(&ACCESS_PRIVATE(rnp, lock), flags); \
348-
} while (0)
343+
#define raw_spin_unlock_irqrestore_rcu_node(p, flags) \
344+
raw_spin_unlock_irqrestore(&ACCESS_PRIVATE(p, lock), flags) \
349345

350346
#define raw_spin_trylock_rcu_node(p) \
351347
({ \

0 commit comments

Comments
 (0)