drm: minor kref_put() nits
authorPaul Bolle <pebolle@tiscali.nl>
Sun, 27 Feb 2011 00:34:08 +0000 (01:34 +0100)
committerJiri Kosina <jkosina@suse.cz>
Sun, 10 Apr 2011 15:01:02 +0000 (17:01 +0200)
There's no need to pass kref_put() the address of a function (just the
function will do just fine) nor to cast its unused return to void.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/gpu/drm/radeon/radeon_fence.c
drivers/gpu/drm/ttm/ttm_object.c

index 9e59868..ab83472 100644 (file)
@@ -322,7 +322,7 @@ void radeon_fence_unref(struct radeon_fence **fence)
 
        *fence = NULL;
        if (tmp) {
-               kref_put(&tmp->kref, &radeon_fence_destroy);
+               kref_put(&tmp->kref, radeon_fence_destroy);
        }
 }
 
index 75e9d6f..ebddd44 100644 (file)
@@ -206,7 +206,7 @@ void ttm_base_object_unref(struct ttm_base_object **p_base)
         */
 
        write_lock(&tdev->object_lock);
-       (void)kref_put(&base->refcount, &ttm_release_base);
+       kref_put(&base->refcount, ttm_release_base);
        write_unlock(&tdev->object_lock);
 }
 EXPORT_SYMBOL(ttm_base_object_unref);