path: root/kernel/rcu/tree.c
diff options
authorBoqun Feng <>2015-07-29 13:29:38 +0800
committerPaul E. McKenney <>2015-10-06 11:08:05 -0700
commitb6a4ae766e3133a4db73fabc81e522d1601cb623 (patch)
tree24f5e9c33b0f89e7e2addd66e32d0e1ca3d16efa /kernel/rcu/tree.c
parent84778472e1b6a27a8931712c40e8cf31143c8f6c (diff)
rcu: Use rcu_callback_t in call_rcu*() and friends
As we now have rcu_callback_t typedefs as the type of rcu callbacks, we should use it in call_rcu*() and friends as the type of parameters. This could save us a few lines of code and make it clear which function requires an rcu callbacks rather than other callbacks as its argument. Besides, this can also help cscope to generate a better database for code reading. Signed-off-by: Boqun Feng <> Signed-off-by: Paul E. McKenney <> Reviewed-by: Josh Triplett <>
Diffstat (limited to 'kernel/rcu/tree.c')
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index 775d36cc0050..b9d9e0249e2f 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -3017,7 +3017,7 @@ static void rcu_leak_callback(struct rcu_head *rhp)
* is expected to specify a CPU.
static void
-__call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *rcu),
+__call_rcu(struct rcu_head *head, rcu_callback_t func,
struct rcu_state *rsp, int cpu, bool lazy)
unsigned long flags;
@@ -3088,7 +3088,7 @@ __call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *rcu),
* Queue an RCU-sched callback for invocation after a grace period.
-void call_rcu_sched(struct rcu_head *head, void (*func)(struct rcu_head *rcu))
+void call_rcu_sched(struct rcu_head *head, rcu_callback_t func)
__call_rcu(head, func, &rcu_sched_state, -1, 0);
@@ -3097,7 +3097,7 @@ EXPORT_SYMBOL_GPL(call_rcu_sched);
* Queue an RCU callback for invocation after a quicker grace period.
-void call_rcu_bh(struct rcu_head *head, void (*func)(struct rcu_head *rcu))
+void call_rcu_bh(struct rcu_head *head, rcu_callback_t func)
__call_rcu(head, func, &rcu_bh_state, -1, 0);
@@ -3111,7 +3111,7 @@ EXPORT_SYMBOL_GPL(call_rcu_bh);
* function may only be called from __kfree_rcu().
void kfree_call_rcu(struct rcu_head *head,
- void (*func)(struct rcu_head *rcu))
+ rcu_callback_t func)
__call_rcu(head, func, rcu_state_p, -1, 1);