diff mbox

[tip/core/rcu,07/17] key: Remove extraneous parentheses from rcu_assign_keypointer()

Message ID 1340379312-6684-7-git-send-email-paulmck@linux.vnet.ibm.com
State New
Headers show

Commit Message

Paul E. McKenney June 22, 2012, 3:35 p.m. UTC
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>

This commit removes the extraneous parentheses from rcu_assign_keypointer()
so that rcu_assign_pointer() can be wrapped in do-while.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
---
 include/linux/key.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

David Howells June 22, 2012, 4:04 p.m. UTC | #1
Paul E. McKenney <paulmck@linux.vnet.ibm.com> wrote:

> This commit removes the extraneous parentheses from rcu_assign_keypointer()
> so that rcu_assign_pointer() can be wrapped in do-while.

Should it be wrapped in a do-while itself then?

And whilst you're at it, could you wrap PAYLOAD in parentheses?

Thanks,
David
Paul E. McKenney June 23, 2012, 5:59 a.m. UTC | #2
On Fri, Jun 22, 2012 at 05:04:36PM +0100, David Howells wrote:
> Paul E. McKenney <paulmck@linux.vnet.ibm.com> wrote:
> 
> > This commit removes the extraneous parentheses from rcu_assign_keypointer()
> > so that rcu_assign_pointer() can be wrapped in do-while.
> 
> Should it be wrapped in a do-while itself then?
> 
> And whilst you're at it, could you wrap PAYLOAD in parentheses?

Will do!

							Thanx, Paul
diff mbox

Patch

diff --git a/include/linux/key.h b/include/linux/key.h
index 4cd22ed..6fafcf4 100644
--- a/include/linux/key.h
+++ b/include/linux/key.h
@@ -303,7 +303,7 @@  static inline bool key_is_instantiated(const struct key *key)
 				   rwsem_is_locked(&((struct key *)(KEY))->sem)))
 
 #define rcu_assign_keypointer(KEY, PAYLOAD)				\
-	(rcu_assign_pointer((KEY)->payload.rcudata, PAYLOAD))
+	rcu_assign_pointer((KEY)->payload.rcudata, PAYLOAD)
 
 #ifdef CONFIG_SYSCTL
 extern ctl_table key_sysctls[];