]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: Replace rcu_assign_pointer() with RCU_INIT_POINTER()
authorMuhammad Falak R Wani <falakreyaz@gmail.com>
Sat, 30 Apr 2016 19:00:24 +0000 (00:30 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 5 May 2016 00:31:06 +0000 (20:31 -0400)
commitda5bdc8922ba5ddb19aa1310a3f6f1f8f3f6bbfd
treee406befdcf80438cd25cb01d60fd28b4a272cf12
parentaa782332eaed085f90ec766b43f27f279dcdf414
drm/amdgpu: Replace rcu_assign_pointer() with RCU_INIT_POINTER()

The rcu_assign_pointer() ensures that the initialization of a structure
is carried out before storing a pointer to that structre. It is always
safe to use RCU_INIT_POINTER() to NULL a pointer, instead of
rcu_assign_pointer().
This results in slightly smaller/faster code.

The following semantic patch was used:
<smpl>

@@
@@

- rcu_assign_pointer
+ RCU_INIT_POINTER
  (..., NULL)

</smpl>

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c