Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aa45950b authored by Geliang Tang's avatar Geliang Tang Committed by Daniel Vetter
Browse files

drm/i915: use hlist_for_each_entry

parent fa5a7970
Loading
Loading
Loading
Loading
+2 −5
Original line number Original line Diff line number Diff line
@@ -193,13 +193,10 @@ static struct i915_vma *eb_get_vma(struct eb_vmas *eb, unsigned long handle)
		return eb->lut[handle];
		return eb->lut[handle];
	} else {
	} else {
		struct hlist_head *head;
		struct hlist_head *head;
		struct hlist_node *node;

		head = &eb->buckets[handle & eb->and];
		hlist_for_each(node, head) {
		struct i915_vma *vma;
		struct i915_vma *vma;


			vma = hlist_entry(node, struct i915_vma, exec_node);
		head = &eb->buckets[handle & eb->and];
		hlist_for_each_entry(vma, head, exec_node) {
			if (vma->exec_handle == handle)
			if (vma->exec_handle == handle)
				return vma;
				return vma;
		}
		}