diff options
author | Muhammad Falak R Wani <falakreyaz@gmail.com> | 2016-05-01 18:05:31 +0530 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-05-13 19:39:20 -0400 |
commit | eea570788ebeb817a5ecb173dafc316779120081 (patch) | |
tree | 07a203f5c509cfc329c91bc35a404ed7395f7a43 /drivers/staging | |
parent | 3923979e9bc6aa6f168a644314d6729e9f98eccc (diff) | |
download | op-kernel-dev-eea570788ebeb817a5ecb173dafc316779120081.zip op-kernel-dev-eea570788ebeb817a5ecb173dafc316779120081.tar.gz |
staging/rdma/hfi1: use RCU_INIT_POINTER() when NULLing.
It is safe to use RCU_INIT_POINTER() to NULL a pointer, instead of
rcu_assign_pointer().
This results in slightly smaller/faster code.
Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/rdma/hfi1/init.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/rdma/hfi1/init.c b/drivers/staging/rdma/hfi1/init.c index 9e71abf..b9beaae 100644 --- a/drivers/staging/rdma/hfi1/init.c +++ b/drivers/staging/rdma/hfi1/init.c @@ -1300,7 +1300,7 @@ static void cleanup_device_data(struct hfi1_devdata *dd) spin_lock(&ppd->cc_state_lock); cc_state = get_cc_state(ppd); - rcu_assign_pointer(ppd->cc_state, NULL); + RCU_INIT_POINTER(ppd->cc_state, NULL); spin_unlock(&ppd->cc_state_lock); if (cc_state) |