[PATCH -next v2] drm/amdgpu: use list_move instead of list_del/list_add in amdgpu_vm.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Using list_move() instead of list_del() + list_add() in amdgpu_vm.c.

Reported-by: Hulk Robot <hulkci@xxxxxxxxxx>
Signed-off-by: Baokun Li <libaokun1@xxxxxxxxxx>
---
V1->V2:
	CC mailist

 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 9e3ab3b6c105..684c13aae4d0 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -2518,8 +2518,7 @@ int amdgpu_vm_bo_clear_mappings(struct amdgpu_device *adev,
 			list_add(&after->list, &tmp->bo_va->invalids);
 		}
 
-		list_del(&tmp->list);
-		list_add(&tmp->list, &removed);
+		list_move(&tmp->list, &removed);
 
 		tmp = amdgpu_vm_it_iter_next(tmp, saddr, eaddr);
 	}




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux