radeon: merge list_del()/list_add_tail() to list_move_tail()
authorNicolas Kaiser <nikai@nikai.net>
Wed, 16 Mar 2011 16:08:04 +0000 (17:08 +0100)
committerDave Airlie <airlied@redhat.com>
Thu, 17 Mar 2011 03:50:40 +0000 (13:50 +1000)
Merge list_del() + list_add_tail() to list_move_tail().

Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/radeon_fence.c

index 171b0b2e3a644303d54797a2c2bafa91f3cf155a..9e59868d354e4a83e6f06d40663171416151a1f5 100644 (file)
@@ -60,8 +60,7 @@ int radeon_fence_emit(struct radeon_device *rdev, struct radeon_fence *fence)
 
        trace_radeon_fence_emit(rdev->ddev, fence->seq);
        fence->emited = true;
-       list_del(&fence->list);
-       list_add_tail(&fence->list, &rdev->fence_drv.emited);
+       list_move_tail(&fence->list, &rdev->fence_drv.emited);
        write_unlock_irqrestore(&rdev->fence_drv.lock, irq_flags);
        return 0;
 }
@@ -121,8 +120,7 @@ static bool radeon_fence_poll_locked(struct radeon_device *rdev)
                i = n;
                do {
                        n = i->prev;
-                       list_del(i);
-                       list_add_tail(i, &rdev->fence_drv.signaled);
+                       list_move_tail(i, &rdev->fence_drv.signaled);
                        fence = list_entry(i, struct radeon_fence, list);
                        fence->signaled = true;
                        i = n;