提交 eea57078 编写于 作者: M Muhammad Falak R Wani 提交者: Doug Ledford

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: NMuhammad Falak R Wani <falakreyaz@gmail.com>
Reviewed-by: NLeon Romanovsky <leonro@mellanox.com>
Signed-off-by: NDoug Ledford <dledford@redhat.com>
上级 3923979e
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册