[PATCH] drm/radeon: use list_move in radeon_vm_bo_update

From: Geliang Tang
Date: Fri Nov 11 2016 - 07:27:02 EST


Use list_move() instead of list_del() + list_add() to simplify the code.

Signed-off-by: Geliang Tang <geliangtang@xxxxxxxxx>
---
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);

--
2.9.3