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

drm/i915: use hlist_for_each_entry

Use hlist_for_each_entry() instead of hlist_for_each() to simplify
the code.
Signed-off-by: default avatarGeliang Tang <geliangtang@163.com>
Link: http://patchwork.freedesktop.org/patch/msgid/b80568b2990ebcc145229a132f045e852ac51ad6.1453126187.git.geliangtang@163.comSigned-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent fa5a7970
......@@ -193,13 +193,10 @@ static struct i915_vma *eb_get_vma(struct eb_vmas *eb, unsigned long handle)
return eb->lut[handle];
} else {
struct hlist_head *head;
struct hlist_node *node;
head = &eb->buckets[handle & eb->and];
hlist_for_each(node, head) {
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)
return vma;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment