dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Liu Ying <Ying.Liu@freescale.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/fb-helper: Remove unnecessary list empty check in drm_fb_helper_debug_enter()
Date: Thu, 19 Jun 2014 10:14:18 +0200	[thread overview]
Message-ID: <20140619081418.GQ5821@phenom.ffwll.local> (raw)
In-Reply-To: <1403164904-7112-1-git-send-email-Ying.Liu@freescale.com>

On Thu, Jun 19, 2014 at 04:01:44PM +0800, Liu Ying wrote:
> The following list empty check is unnecessary because we would still do nothing
> real and return 'val' if my_list is empty.
> 
> if (list_empty(&my_list))
> 	return val;
> 
> list_for_each_entry(pos, &my_list, member) {
> 	...
> }
> 
> return val;
> 
> This patch removes the unnecessary check in drm_fb_helper_debug_enter().
> 
> Signed-off-by: Liu Ying <Ying.Liu@freescale.com>

Merged into my core-stuff branch, will send a pull to Dave for 3.17.
-Daniel

> ---
>  drivers/gpu/drm/drm_fb_helper.c |    3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> index d5d8cea..eb77a2f 100644
> --- a/drivers/gpu/drm/drm_fb_helper.c
> +++ b/drivers/gpu/drm/drm_fb_helper.c
> @@ -199,9 +199,6 @@ int drm_fb_helper_debug_enter(struct fb_info *info)
>  	struct drm_crtc_helper_funcs *funcs;
>  	int i;
>  
> -	if (list_empty(&kernel_fb_helper_list))
> -		return false;
> -
>  	list_for_each_entry(helper, &kernel_fb_helper_list, kernel_fb_list) {
>  		for (i = 0; i < helper->crtc_count; i++) {
>  			struct drm_mode_set *mode_set =
> -- 
> 1.7.9.5
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

      reply	other threads:[~2014-06-19  8:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-19  8:01 [PATCH] drm/fb-helper: Remove unnecessary list empty check in drm_fb_helper_debug_enter() Liu Ying
2014-06-19  8:14 ` 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=20140619081418.GQ5821@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=Ying.Liu@freescale.com \
    --cc=dri-devel@lists.freedesktop.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