Skip to content

Commit

Permalink
drm: minor kref_put() nits
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paul Bolle authored and Jiri Kosina committed Apr 10, 2011
1 parent 7422caa commit cdb650a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/radeon/radeon_fence.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/ttm/ttm_object.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit cdb650a

Please sign in to comment.