Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751539AbdIELIw (ORCPT ); Tue, 5 Sep 2017 07:08:52 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:36363 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750916AbdIELIv (ORCPT ); Tue, 5 Sep 2017 07:08:51 -0400 X-Google-Smtp-Source: ADKCNb7E6/+PSFYsL0iAvjE7VcGvQDMSFu7toaH+amNnyKNmino6/CCjuAm/9ENcmVmfkMsG1JH6pw== Date: Tue, 5 Sep 2017 13:08:47 +0200 From: Daniel Vetter To: Arnd Bergmann Cc: Patrik Jakobsson , David Airlie , Daniel Vetter , Ville =?iso-8859-1?Q?Syrj=E4l=E4?= , Laurent Pinchart , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] drm: gma500: fix logic error Message-ID: <20170905110847.oy2tilpmvu2mkuls@phenom.ffwll.local> Mail-Followup-To: Arnd Bergmann , Patrik Jakobsson , David Airlie , Ville =?iso-8859-1?Q?Syrj=E4l=E4?= , Laurent Pinchart , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <20170905074741.435324-1-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170905074741.435324-1-arnd@arndb.de> X-Operating-System: Linux phenom 4.12.0-1-amd64 User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1407 Lines: 41 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 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