From patchwork Thu May 11 12:47:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9721391 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 8DAE960236 for ; Thu, 11 May 2017 12:47:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 82BB728652 for ; Thu, 11 May 2017 12:47:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 777272865C; Thu, 11 May 2017 12:47:42 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8117828653 for ; Thu, 11 May 2017 12:47:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932812AbdEKMr2 (ORCPT ); Thu, 11 May 2017 08:47:28 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:53621 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932181AbdEKMr0 (ORCPT ); Thu, 11 May 2017 08:47:26 -0400 Received: from wuerfel.lan ([78.42.17.5]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.145]) with ESMTPA (Nemesis) id 0MbQQe-1dPDt43EXc-00Im5z; Thu, 11 May 2017 14:47:18 +0200 From: Arnd Bergmann To: Bartlomiej Zolnierkiewicz , Andrew Morton Cc: Arnd Bergmann , linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] fbdev: avoid int-in-bool-context warning Date: Thu, 11 May 2017 14:47:01 +0200 Message-Id: <20170511124717.179251-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:KKNc4Hb8m8/jphy11FrQdlGv0BjNqnO/ciqzNmx3NLo63QuP/ui cjd/bIRPdSTjI5EPZMgdh8Q42gSclRcWCKuoJ9giDfxe7R5gS+9hxFMvgRexNME1C97pXXs J3ZZD7CSTYium1ImwkKfbWvMSpK0y82KfdFfS6VckC9/bkVo7L4jacLDwhoav/EU+O9c6u5 O8vhPcqqavAJGeP8a7+3g== X-UI-Out-Filterresults: notjunk:1; V01:K0:la9kd/iBHos=:OMPeMqnpDF4+NGs9huLcN1 R1eAAtkqBOdKc+zv8c/cCZie5DLfRXRxLlpfmB2H7OE3tb3+GRsvBnU0Zp19NsXM6RvI34/zZ 11+oXa53MCmk/a8fV5I7xvbSpGTI5gKu8muNuyav+HbQH3JomLBlIqnw8LafGjvgavXVyCF1P SLXvGaDMrNCQuiXjNAZxWWNQZT75wHQy0dNijQllYv1uQHX02Y+2GWzza6FDQLcr3182VJ2M8 JusCRcNEt7JQKmAY7aXn/kLXCk7OfJZVnv+qzEMFYpwvudGbkiNMNkXz1+GRAsSASF0cEkhgu CUIdIjMtFun+wIa91yOIiuEbgye6HH9ohsRbeJjfBGvHUjLtRGAvQR4rAw1xkHjRNdxbLhguq pop6FF41GFmICRswUbRlSeSVqu7X0kum3W+V+ujEgoLz9kvzF00pKSfflMVnbP5S+AwxmEIsb VMCV7MHL8NO+2ueHo/+iSg66CfMQ9DC1IzCZbESGyaLgQzMhcGUwLJ5K2KCr88bCI8hkTwp1y cDAVKF1BJLPcsclUcVhNpc0NO+VxAiiDSfMcMRHRdf8LXdZNzeW9S+/qVXtzl0W+zaQALLC9E RssIovkSDjp1Uwx80tBJrh8iN78Y4g3ZKU7lgMzebz/aef+m1XoaVrSPlx499xHlh3U2D4vbM DbV3FW8OrOnunouafdIuSweSbUarJbgdT4tjmStoGhU3JRgQhmuJPPQRwjcuvYk0ek88= Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP gcc-7 suspects this code might be wrong because we use the result of a multiplication as a bool: drivers/video/fbdev/core/fbmon.c: In function 'fb_edid_add_monspecs': drivers/video/fbdev/core/fbmon.c:1051:84: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context] It's actually fine, so let's add a comparison to zero to make that clear to the compiler too. Signed-off-by: Arnd Bergmann --- drivers/video/fbdev/core/fbmon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/core/fbmon.c b/drivers/video/fbdev/core/fbmon.c index eaa6bab21839..99e45a49e435 100644 --- a/drivers/video/fbdev/core/fbmon.c +++ b/drivers/video/fbdev/core/fbmon.c @@ -1048,7 +1048,7 @@ void fb_edid_add_monspecs(unsigned char *edid, struct fb_monspecs *specs) for (i = 0; i < (128 - edid[2]) / DETAILED_TIMING_DESCRIPTION_SIZE; i++, block += DETAILED_TIMING_DESCRIPTION_SIZE) - if (PIXEL_CLOCK) + if (PIXEL_CLOCK != 0) edt[num++] = block - edid; /* Yikes, EDID data is totally useless */