Skip to content

Commit

Permalink
rcu: Use call_rcu_func_t to replace explicit type equivalents
Browse files Browse the repository at this point in the history
We have had the call_rcu_func_t typedef for a quite awhile, but we still
use explicit function pointer types in some places.  These types can
confuse cscope and can be hard to read.  This patch therefore replaces
these types with the call_rcu_func_t typedef.

Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
  • Loading branch information
Boqun Feng authored and Paul E. McKenney committed Oct 6, 2015
1 parent b6a4ae7 commit db3e8db
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion kernel/rcu/rcutorture.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ struct rcu_torture_ops {
void (*exp_sync)(void);
unsigned long (*get_state)(void);
void (*cond_sync)(unsigned long oldstate);
void (*call)(struct rcu_head *head, void (*func)(struct rcu_head *rcu));
call_rcu_func_t call;
void (*cb_barrier)(void);
void (*fqs)(void);
void (*stats)(void);
Expand Down
3 changes: 1 addition & 2 deletions kernel/rcu/tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,7 @@ struct rcu_state {
/* shut bogus gcc warning) */
u8 flavor_mask; /* bit in flavor mask. */
struct rcu_data __percpu *rda; /* pointer of percu rcu_data. */
void (*call)(struct rcu_head *head, /* call_rcu() flavor. */
void (*func)(struct rcu_head *head));
call_rcu_func_t call; /* call_rcu() flavor. */

/* The following fields are guarded by the root rcu_node's lock. */

Expand Down

0 comments on commit db3e8db

Please sign in to comment.