aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
diff options
context:
space:
mode:
authorHuang Rui <[email protected]>2016-09-07 05:24:31 +0000
committerAlex Deucher <[email protected]>2016-09-14 19:10:29 +0000
commitd28d6e6fa55e08a16a83ae572b1cbf4f03e8fbf1 (patch)
tree0105b35dfdb417a38e55ef043204b80ecd2b972a /drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
parentdrm/amdgpu:implement CONTEXT_CONTROL (v5) (diff)
downloadkernel-d28d6e6fa55e08a16a83ae572b1cbf4f03e8fbf1.tar.gz
kernel-d28d6e6fa55e08a16a83ae572b1cbf4f03e8fbf1.zip
drm: modify drm_global_item_ref to avoid two times of writing ref->object
In previous drm_global_item_ref, there are two times of writing ref->object if item->refcount is 0. So this patch does a minor update to put alloc and init ref firstly, and then to modify the item of glob array. Use "else" to avoid two times of writing ref->object. It can make the code logic more clearly. Reviewed-by: Christian König <[email protected]> Signed-off-by: Huang Rui <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c')
0 files changed, 0 insertions, 0 deletions