mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "Patrik Jakobsson" <patrik.r.jakobsson@gmail.com>,
	"David Airlie" <airlied@linux.ie>,
	"Daniel Vetter" <daniel.vetter@ffwll.ch>,
	"Ville Syrjälä" <ville.syrjala@linux.intel.com>,
	"Laurent Pinchart" <laurent.pinchart@ideasonboard.com>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm: gma500: fix logic error
Date: Tue, 5 Sep 2017 13:08:47 +0200	[thread overview]
Message-ID: <20170905110847.oy2tilpmvu2mkuls@phenom.ffwll.local> (raw)
In-Reply-To: <20170905074741.435324-1-arnd@arndb.de>

On Tue, Sep 05, 2017 at 09:47:26AM +0200, Arnd Bergmann wrote:
> gcc-8 points out a condition that almost certainly doesn't
> do what the author had in mind:
> 
> drivers/gpu/drm/gma500/mdfld_intel_display.c: In function 'mdfldWaitForPipeEnable':
> drivers/gpu/drm/gma500/mdfld_intel_display.c:102:37: error: bitwise comparison always evaluates to false [-Werror=tautological-compare]
> 
> This changes it to a simple bit mask operation to check
> whether the bit is set.
> 
> Fixes: 026abc333205 ("gma500: initial medfield merge")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Applied to drm-misc, thanks.
-Daniel

> ---
>  drivers/gpu/drm/gma500/mdfld_intel_display.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/gma500/mdfld_intel_display.c b/drivers/gpu/drm/gma500/mdfld_intel_display.c
> index 531e4450c000..5c066448be5b 100644
> --- a/drivers/gpu/drm/gma500/mdfld_intel_display.c
> +++ b/drivers/gpu/drm/gma500/mdfld_intel_display.c
> @@ -99,7 +99,7 @@ void mdfldWaitForPipeEnable(struct drm_device *dev, int pipe)
>  	/* Wait for for the pipe enable to take effect. */
>  	for (count = 0; count < COUNT_MAX; count++) {
>  		temp = REG_READ(map->conf);
> -		if ((temp & PIPEACONF_PIPE_STATE) == 1)
> +		if (temp & PIPEACONF_PIPE_STATE)
>  			break;
>  	}
>  }
> -- 
> 2.9.0
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

      reply	other threads:[~2017-09-05 11:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-05  7:47 Arnd Bergmann
2017-09-05 11:08 ` 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=20170905110847.oy2tilpmvu2mkuls@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=airlied@linux.ie \
    --cc=arnd@arndb.de \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patrik.r.jakobsson@gmail.com \
    --cc=ville.syrjala@linux.intel.com \
    /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

all inboxes | Powered by JetHome®