diff options
author | Paulo Zanoni <paulo.r.zanoni@intel.com> | 2023-09-29 20:31:03 +0300 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2023-12-21 19:42:09 +0300 |
commit | 66aca8f04bb982b9f429fbce384beaa4badae21a (patch) | |
tree | 7bde1ff6c1a622312232097c2b7eb7bf091c9953 /drivers/gpu/drm/xe/xe_vm.c | |
parent | 5f01a35b10f3d2f55634a471c43e59e3c6f239fd (diff) | |
download | linux-66aca8f04bb982b9f429fbce384beaa4badae21a.tar.xz |
drm/xe/vm: use list_last_entry() to fetch last_op
I would imagine that it's more efficient to fetch ops_list->prev than
to walk the whole list forward.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_vm.c')
-rw-r--r-- | drivers/gpu/drm/xe/xe_vm.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c index ae5578a3e121..b61ed51b503d 100644 --- a/drivers/gpu/drm/xe/xe_vm.c +++ b/drivers/gpu/drm/xe/xe_vm.c @@ -3118,8 +3118,7 @@ static int vm_bind_ioctl_ops_execute(struct xe_vm *vm, lockdep_assert_held_write(&vm->lock); - list_for_each_entry(op, ops_list, link) - last_op = op; + last_op = list_last_entry(ops_list, struct xe_vma_op, link); if (!async) { err = xe_vma_op_execute(vm, last_op); |