From: Boqun Feng <boqun.feng@gmail.com>
To: Josh Triplett <josh@joshtriplett.org>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Lai Jiangshan <jiangshanlai@gmail.com>,
linux-kernel@vger.kernel.org, Boqun Feng <boqun.feng@gmail.com>
Subject: [PATCH 2/2] rcu: Use call_rcu_func_to to replace explicit type equivalents
Date: Wed, 29 Jul 2015 13:29:39 +0800 [thread overview]
Message-ID: <1438147779-24978-3-git-send-email-boqun.feng@gmail.com> (raw)
In-Reply-To: <1438147779-24978-1-git-send-email-boqun.feng@gmail.com>
We have call_rcu_func_t for a quite while, but we still use explicit
function pointer type equivalents in some places, this patch replace
these equivalent types with call_rcu_func_t to gain better readability.
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
---
kernel/rcu/rcutorture.c | 2 +-
kernel/rcu/tree.h | 3 +--
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
index 51c8e7f..f9ec6cb 100644
--- a/kernel/rcu/rcutorture.c
+++ b/kernel/rcu/rcutorture.c
@@ -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);
diff --git a/kernel/rcu/tree.h b/kernel/rcu/tree.h
index ad11529..0c33c82 100644
--- a/kernel/rcu/tree.h
+++ b/kernel/rcu/tree.h
@@ -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. */
--
2.4.6
next prev parent reply other threads:[~2015-07-29 5:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-29 5:29 [PATCH 0/2] Replace explicit function pointer types with rcu_callback_t and call_rcu_func_t Boqun Feng
2015-07-29 5:29 ` [PATCH 1/2] rcu: Use rcu_callback_t in call_rcu*() and friends Boqun Feng
2015-07-29 5:29 ` Boqun Feng [this message]
2015-07-29 14:55 ` [PATCH 0/2] Replace explicit function pointer types with rcu_callback_t and call_rcu_func_t Paul E. McKenney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1438147779-24978-3-git-send-email-boqun.feng@gmail.com \
--to=boqun.feng@gmail.com \
--cc=jiangshanlai@gmail.com \
--cc=josh@joshtriplett.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®