Re: [PATCH] drm/radeon: use list_move in radeon_vm_bo_update

From: Christian KÃnig
Date: Fri Nov 11 2016 - 08:47:32 EST


Am 11.11.2016 um 13:26 schrieb Geliang Tang:
Use list_move() instead of list_del() + list_add() to simplify the code.

Signed-off-by: Geliang Tang <geliangtang@xxxxxxxxx>

Reviewed-by: Christian König <christian.koenig@xxxxxxx>.

---
drivers/gpu/drm/radeon/radeon_vm.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_vm.c b/drivers/gpu/drm/radeon/radeon_vm.c
index a135874..2f1e372 100644
--- a/drivers/gpu/drm/radeon/radeon_vm.c
+++ b/drivers/gpu/drm/radeon/radeon_vm.c
@@ -933,8 +933,7 @@ int radeon_vm_bo_update(struct radeon_device *rdev,
}
list_del_init(&bo_va->vm_status);
} else {
- list_del(&bo_va->vm_status);
- list_add(&bo_va->vm_status, &vm->cleared);
+ list_move(&bo_va->vm_status, &vm->cleared);
}
spin_unlock(&vm->status_lock);