Function ttm_bo_wait_unreserved can be slightly simplified. Signed-off-by: Jean Delvare <khali@xxxxxxxxxxxx> Cc: Thomas Hellstrom <thellstrom@xxxxxxxxxx> Cc: Jerome Glisse <jglisse@xxxxxxxxxx> --- drivers/gpu/drm/ttm/ttm_bo.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) --- linux-2.6.36-rc7.orig/drivers/gpu/drm/ttm/ttm_bo.c 2010-10-09 13:38:39.000000000 +0200 +++ linux-2.6.36-rc7/drivers/gpu/drm/ttm/ttm_bo.c 2010-10-09 14:23:07.000000000 +0200 @@ -169,18 +169,13 @@ static void ttm_bo_release_list(struct k int ttm_bo_wait_unreserved(struct ttm_buffer_object *bo, bool interruptible) { - if (interruptible) { - int ret = 0; - - ret = wait_event_interruptible(bo->event_queue, + return wait_event_interruptible(bo->event_queue, atomic_read(&bo->reserved) == 0); - if (unlikely(ret != 0)) - return ret; } else { wait_event(bo->event_queue, atomic_read(&bo->reserved) == 0); + return 0; } - return 0; } EXPORT_SYMBOL(ttm_bo_wait_unreserved); -- Jean Delvare _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel