From patchwork Tue Sep 5 07:47:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9938097 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 077946038C for ; Tue, 5 Sep 2017 07:47:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EE509288D4 for ; Tue, 5 Sep 2017 07:47:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E333B288D8; Tue, 5 Sep 2017 07:47:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 692F5288D4 for ; Tue, 5 Sep 2017 07:47:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 06F9689EBD; Tue, 5 Sep 2017 07:47:56 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.75]) by gabe.freedesktop.org (Postfix) with ESMTPS id 523966E3D8 for ; Tue, 5 Sep 2017 07:47:52 +0000 (UTC) Received: from wuerfel.lan ([95.208.190.237]) by mrelayeu.kundenserver.de (mreue102 [212.227.15.145]) with ESMTPA (Nemesis) id 0Mbyj8-1e50mE3tZ8-00JGGX; Tue, 05 Sep 2017 09:47:45 +0200 From: Arnd Bergmann To: Patrik Jakobsson , David Airlie Subject: [PATCH] drm: gma500: fix logic error Date: Tue, 5 Sep 2017 09:47:26 +0200 Message-Id: <20170905074741.435324-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:r0p2XeHzoRpqKghAxkidIAQjNGX9Xildai9JJAhxVOVDCaGqdCk QZwOxAtd6AXrqXfRK0zWzYvbPGarUP5gzyYZzyPt6Mg4uxcco0VVGQTrFXYjDHsn0Uqwhjt YOx0fT0k9V2Zn/SLnKYm+yXzhv22p7/lJYL440O8ucpONhHMiMZ8Nesymyy5o3UTyKT5Wn+ X285MjnqJpwORw3apEqUw== X-UI-Out-Filterresults: notjunk:1; V01:K0:zuplMxN8ieo=:QiB0+JXDsN8tLaxZ3Y9D0P c6w8jL1Gi7vD7GVx2AjFjC2/tnj3xxmS2loFrHpvOvENchyVpMORFmGBDbu/IPD95Sj7W0wsx kSx6SMA1F96ww9fuQvaITP3u+FvZ3aeG/7GQuSd4Edh8K9hI+U3Kj5+Vuye1++4PXPZLTRRb0 zSB2MJ3Z3hJ23UxzcNHQh4sZB9fR/g1WA9RlSRzoCVROONCubMnFOmp34AeKKZjsFeCQTHe6B yrgPIQNHAaXT/1ni6p2QFOWGKnm2mHhgsBVxfTzU+Twg3lus1TSqYbg/zv9MZfKGRiXyVxWPC LkQ9JDJ0DqVQYAQO7lu85V2iEl2z2aiwr4cxnoVGHMg2X3xrBM1Qd9waTxNoTbgMyiMXnZ0G8 aWi5ucg0GFCv9jwU+X/D0q9qr1YM78jOQIsxiD3GXDg0pY1AZfRcsbSlYQ3c1C+tESkkCeUBy 7m3i4NBNHggM1QlHDmPCbJycwoqqht/d3NBM21IbMaFGIBChfd6LwRz9je+zmjvv4kx6nwhMy Fewe1wxOuvqtC8XbcjOYJWQAYZor7B7IWSOdSYfuZP1maMjdHueeIipEC+hl5cinKyvLE5XWM UtyKfeLm1I70xn1ok3INafSHcmcKEs3pw4iy00GYMOB6qFehPUnV2Hfp3zrszkwVzQEBMRQD/ ey4yca4XM9vJAvT/SI4KCsokiemXFFI3oZ7wMR/udvvC0cXv+69r+kxSDYF4SM6/hW4HvJky9 PJwNGB5LsVrfKzOEKD2OyeEMgUyZCxi2fnaqjA== Cc: Arnd Bergmann , Daniel Vetter , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Laurent Pinchart X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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; } }