summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/i915_gem_execbuffer.c
diff options
context:
space:
mode:
authorGeliang Tang <geliangtang@163.com>2016-01-18 23:54:20 +0800
committerDaniel Vetter <daniel.vetter@ffwll.ch>2016-01-18 17:49:59 +0100
commitaa45950bac01bf9319328e67696cf0b231cec39d (patch)
tree5d2b6fbdb636ac916c7212008d6f1a7af7e5fa46 /drivers/gpu/drm/i915/i915_gem_execbuffer.c
parentfa5a7970d372c9c9beb3a0ce79ee1d0c23387d0a (diff)
downloadlwn-aa45950bac01bf9319328e67696cf0b231cec39d.tar.gz
lwn-aa45950bac01bf9319328e67696cf0b231cec39d.zip
drm/i915: use hlist_for_each_entry
Use hlist_for_each_entry() instead of hlist_for_each() to simplify the code. Signed-off-by: Geliang Tang <geliangtang@163.com> Link: http://patchwork.freedesktop.org/patch/msgid/b80568b2990ebcc145229a132f045e852ac51ad6.1453126187.git.geliangtang@163.com Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem_execbuffer.c')
-rw-r--r--drivers/gpu/drm/i915/i915_gem_execbuffer.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
index d469c4779ff5..4edf1c062210 100644
--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
@@ -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;
+ struct i915_vma *vma;
head = &eb->buckets[handle & eb->and];
- hlist_for_each(node, head) {
- struct i915_vma *vma;
-
- vma = hlist_entry(node, struct i915_vma, exec_node);
+ hlist_for_each_entry(vma, head, exec_node) {
if (vma->exec_handle == handle)
return vma;
}