[PATCH] drm/amdgpu: fix drm-get-put.cocci warnings
Julia Lawall
julia.lawall at lip6.fr
Wed Jun 7 08:14:34 UTC 2017
Use drm_*_get() and drm_*_put() helpers instead of drm_*_reference() and
drm_*_unreference() helpers.
Generated by: scripts/coccinelle/api/drm-get-put.cocci
CC: Christian König <christian.koenig at amd.com>
Signed-off-by: Julia Lawall <julia.lawall at lip6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu at intel.com>
---
Please take the patch only if it's a positive warning. Thanks!
amdgpu_prime.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c
@@ -173,7 +173,7 @@ amdgpu_gem_prime_foreign_bo(struct amdgp
continue;
ww_mutex_unlock(&bo->tbo.resv->lock);
- drm_gem_object_reference(&gobj->base);
+ drm_gem_object_get(&gobj->base);
return &gobj->base;
}
More information about the amd-gfx
mailing list