From: Daniel Vetter <daniel@ffwll.ch>
To: Geliang Tang <geliangtang@163.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>,
Jani Nikula <jani.nikula@linux.intel.com>,
David Airlie <airlied@linux.ie>,
intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org,
dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 1/5 v2] drm/i915: use hlist_for_each_entry
Date: Mon, 18 Jan 2016 17:49:37 +0100 [thread overview]
Message-ID: <20160118164937.GK19130@phenom.ffwll.local> (raw)
In-Reply-To: <b80568b2990ebcc145229a132f045e852ac51ad6.1453126187.git.geliangtang@163.com>
On Mon, Jan 18, 2016 at 11:54:20PM +0800, Geliang Tang wrote:
> Use hlist_for_each_entry() instead of hlist_for_each() to simplify
> the code.
>
> Signed-off-by: Geliang Tang <geliangtang@163.com>
> ---
> Changes in v2:
> - Keep head = &eb->buckets[handle & eb->and]
Queued for -next, thanks for the patch.
-Daniel
> ---
> drivers/gpu/drm/i915/i915_gem_execbuffer.c | 7 ++-----
> 1 file 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 dccb517..7dc95a7 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;
> }
> --
> 2.5.0
>
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
prev parent reply other threads:[~2016-01-18 16:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-13 14:48 [PATCH 1/5] " Geliang Tang
2016-01-13 14:48 ` [PATCH 2/5] drm/i915: use kobj_to_dev() Geliang Tang
2016-01-13 15:42 ` [Intel-gfx] " Daniel Vetter
2016-01-13 14:48 ` [PATCH 3/5] drm/sysfs: " Geliang Tang
2016-01-13 15:43 ` Daniel Vetter
2016-01-13 14:48 ` [PATCH 4/5] drm/amdgpu: " Geliang Tang
2016-01-13 14:48 ` [PATCH 5/5] drm/radeon: " Geliang Tang
2016-01-13 17:17 ` Alex Deucher
2016-01-13 15:12 ` [Intel-gfx] [PATCH 1/5] drm/i915: use hlist_for_each_entry Chris Wilson
2016-01-18 15:54 ` [PATCH 1/5 v2] " Geliang Tang
2016-01-18 16:49 ` Daniel Vetter [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160118164937.GK19130@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=airlied@linux.ie \
--cc=daniel.vetter@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=geliangtang@163.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome