From: Paul E. McKenney Date: Thu, 11 May 2017 22:33:23 +0000 (-0700) Subject: rcu: Remove typecheck() from RCU locking wrapper functions X-Git-Tag: v4.13-rc1~209^2^2~10 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=4e4bea7427062ec15df7084f97728e2a44d912e3;p=karo-tx-linux.git 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 --- diff --git a/kernel/rcu/rcu.h b/kernel/rcu/rcu.h index 2a75beb883c8..bc55b5716c37 100644 --- a/kernel/rcu/rcu.h +++ b/kernel/rcu/rcu.h @@ -334,18 +334,14 @@ do { \ #define raw_spin_unlock_irq_rcu_node(p) \ raw_spin_unlock_irq(&ACCESS_PRIVATE(p, lock)) -#define raw_spin_lock_irqsave_rcu_node(rnp, flags) \ +#define raw_spin_lock_irqsave_rcu_node(p, flags) \ do { \ - typecheck(unsigned long, flags); \ - raw_spin_lock_irqsave(&ACCESS_PRIVATE(rnp, lock), flags); \ + raw_spin_lock_irqsave(&ACCESS_PRIVATE(p, lock), flags); \ smp_mb__after_unlock_lock(); \ } while (0) -#define raw_spin_unlock_irqrestore_rcu_node(rnp, flags) \ -do { \ - typecheck(unsigned long, flags); \ - raw_spin_unlock_irqrestore(&ACCESS_PRIVATE(rnp, lock), flags); \ -} while (0) +#define raw_spin_unlock_irqrestore_rcu_node(p, flags) \ + raw_spin_unlock_irqrestore(&ACCESS_PRIVATE(p, lock), flags) \ #define raw_spin_trylock_rcu_node(p) \ ({ \