* [PATCH] drm/nouveau/fence: use RCU_INIT_POINTER() when NULLing.
@ 2016-05-01 13:00 Muhammad Falak R Wani
0 siblings, 0 replies; only message in thread
From: Muhammad Falak R Wani @ 2016-05-01 13:00 UTC (permalink / raw)
To: David Airlie; +Cc: Ben Skeggs, dri-devel, linux-kernel
It is safe to use RCU_INIT_POINTER() to NULL, instead of
rcu_assign_pointer().
This results in slightly smaller/faster code.
The follwoing semantic patch was used:
<smpl>
@@
@@
- rcu_assign_pointer
+ RCU_INIT_POINTER
(..., NULL)
</smpl>
Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
---
drivers/gpu/drm/nouveau/nouveau_fence.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_fence.c b/drivers/gpu/drm/nouveau/nouveau_fence.c
index 9a8c5b7..c842dc4 100644
--- a/drivers/gpu/drm/nouveau/nouveau_fence.c
+++ b/drivers/gpu/drm/nouveau/nouveau_fence.c
@@ -60,7 +60,7 @@ nouveau_fence_signal(struct nouveau_fence *fence)
fence_signal_locked(&fence->base);
list_del(&fence->head);
- rcu_assign_pointer(fence->channel, NULL);
+ RCU_INIT_POINTER(fence->channel, NULL);
if (test_bit(FENCE_FLAG_USER_BITS, &fence->base.flags)) {
struct nouveau_fence_chan *fctx = nouveau_fctx(fence);
--
1.9.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-05-01 13:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-01 13:00 [PATCH] drm/nouveau/fence: use RCU_INIT_POINTER() when NULLing Muhammad Falak R Wani
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®