dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Romanick <idr@freedesktop.org>
To: Daniel Vetter <daniel.vetter@ffwll.ch>,
	DRI Development <dri-devel@lists.freedesktop.org>
Cc: Dave Jones <davej@redhat.com>, Dave Airlie <airlied@redhat.com>
Subject: Re: [PATCH 08/13] drm/ast: Remove dead code from cbr_scan2
Date: Mon, 07 Apr 2014 08:28:02 -0700	[thread overview]
Message-ID: <5342C402.3070305@freedesktop.org> (raw)
In-Reply-To: <1396691102-22904-10-git-send-email-daniel.vetter@ffwll.ch>

On 04/05/2014 02:44 AM, Daniel Vetter wrote:
> The outer if already checks for data != 0, so it can't really be
> 0. Hence remove it.
> 
> Now I don't have specs or anything for this beast, so I have no
> idea whether this was actually intended or whether the logic
> should be different. At least the code still seems to be doing
> something useful.
> 
> Spotted by coverity.
> 
> Cc: Dave Airlie <airlied@redhat.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
>  drivers/gpu/drm/ast/ast_post.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/ast/ast_post.c b/drivers/gpu/drm/ast/ast_post.c
> index 977cfb35837a..6263116054b6 100644
> --- a/drivers/gpu/drm/ast/ast_post.c
> +++ b/drivers/gpu/drm/ast/ast_post.c
> @@ -572,8 +572,6 @@ static u32 cbr_scan2(struct ast_private *ast)
>  		for (loop = 0; loop < CBR_PASSNUM2; loop++) {
>  			if ((data = cbr_test2(ast)) != 0) {
>  				data2 &= data;
> -				if (!data)
> -					return 0;

That feels like a typo... was that supposed to be 'if (!data2)'?

>  				break;
>  			}
>  		}
> 

  reply	other threads:[~2014-04-07 15:28 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-05  9:44 [PATCH 00/13] coverity Daniel Vetter
2014-04-05  9:44 ` Daniel Vetter
2014-04-07 16:01   ` David Herrmann
2014-04-05  9:44 ` [PATCH 01/13] drm/mgag200: Remove unnecessary NULL check in bo_unref Daniel Vetter
2014-04-07 15:19   ` Ian Romanick
2014-04-07 19:56     ` Daniel Vetter
2014-04-07 20:08       ` Ian Romanick
2014-04-05  9:44 ` [PATCH 02/13] drm/mgag200: Remove unecessary NULL check in gem_free Daniel Vetter
2014-04-07 15:23   ` Ian Romanick
2014-04-05  9:44 ` [PATCH 03/13] drm/cirrus: Remove unnecessary NULL check in bo_unref Daniel Vetter
2014-04-05  9:44 ` [PATCH 04/13] drm/cirrus: Remove unecessary NULL check in gem_free Daniel Vetter
2014-04-07 15:25   ` Ian Romanick
2014-04-05  9:44 ` [PATCH 05/13] drm/ast: Remove unnecessary NULL check in bo_unref Daniel Vetter
2014-04-05  9:44 ` [PATCH 06/13] drm/mgag200: Remove unecessary NULL check in gem_free Daniel Vetter
2014-04-05 16:17   ` [PATCH] drm/ast: " Daniel Vetter
2014-04-07 15:26   ` [PATCH 06/13] drm/mgag200: " Ian Romanick
2014-04-05  9:44 ` [PATCH 07/13] drm/via: Remove unecessary NULL check Daniel Vetter
2014-04-07 15:51   ` David Herrmann
2014-04-07 17:08     ` Daniel Vetter
2014-04-05  9:44 ` [PATCH 08/13] drm/ast: Remove dead code from cbr_scan2 Daniel Vetter
2014-04-07 15:28   ` Ian Romanick [this message]
2014-04-07 19:54     ` Daniel Vetter
2014-04-05  9:44 ` [PATCH 09/13] drm/udl: Initialize ret in udl_driver_load Daniel Vetter
2014-04-05  9:44 ` [PATCH 10/13] drm/bochs: Remove unnecessary NULL check in bo_unref Daniel Vetter
2014-04-05  9:45 ` [PATCH 11/13] drm/bochs: Remove unecessary NULL check in gem_free Daniel Vetter
2014-04-07 15:28   ` Ian Romanick
2014-04-05  9:45 ` [PATCH 12/13] drm/i2c/tda998x: Fix signed overflow issue Daniel Vetter
2014-04-07 15:31   ` Ian Romanick
2014-04-05  9:45 ` [PATCH 13/13] drm: Fix error handling in drm_master_create Daniel Vetter

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=5342C402.3070305@freedesktop.org \
    --to=idr@freedesktop.org \
    --cc=airlied@redhat.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=davej@redhat.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