mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-14 10:15:55 -04:00
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>
This commit is contained in:
committed by
Rodrigo Vivi
parent
5f01a35b10
commit
66aca8f04b
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user