From patchwork Fri Jul 14 09:25:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9840293 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 BD223602BD for ; Fri, 14 Jul 2017 09:29:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AD6AC2876A for ; Fri, 14 Jul 2017 09:29:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A1F6228777; Fri, 14 Jul 2017 09:29:02 +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=-3.7 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_SPAM 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 456722876A for ; Fri, 14 Jul 2017 09:29:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6AE1F6E7AE; Fri, 14 Jul 2017 09:29:01 +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 [212.227.17.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id D85066E7AC for ; Fri, 14 Jul 2017 09:28:59 +0000 (UTC) Received: from wuerfel.lan ([5.56.224.194]) by mrelayeu.kundenserver.de (mreue103 [212.227.15.145]) with ESMTPA (Nemesis) id 0LoaZ0-1e7lXR2K9i-00gYj0; Fri, 14 Jul 2017 11:27:03 +0200 From: Arnd Bergmann To: linux-kernel@vger.kernel.org, Bill Metzenthen , x86@kernel.org Subject: [PATCH 04/14] x86: math-emu: avoid -Wint-in-bool-context warning Date: Fri, 14 Jul 2017 11:25:16 +0200 Message-Id: <20170714092540.1217397-5-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20170714092540.1217397-1-arnd@arndb.de> References: <20170714092540.1217397-1-arnd@arndb.de> X-Provags-ID: V03:K0:Hh4ufQSHMIAol5nU82ELwxeaOTiTOZdWK3V5NC+WN4sbgugBUEi JdNUnF4eXaFCJRBP5Dad06DR951m2MJevWDoTPy+BBdfHkmSNoflFsplp3H3onCWdd0X+XW 20REG5g4n6VKenJshGIkaVfVQr8AZvvvAkMYfDsU78TO1SNeA1ToRj5EmwH4pfAHjCg/qXA KFKVhp2I2zJxp7cSpxn5A== X-UI-Out-Filterresults: notjunk:1; V01:K0:i8zEyOqgHHw=:WTVBsUHlVu/w1NjwRyOGR5 l1QfMaOhFfUjxc0FoVX72MZozqg3688WhVV8Jv2sQBjBUuI7s0QxTuIh1vCjaOkVdfdy69rON fWotLDbMr/OUzpLBwZ86TXRAqE5de4r8jr2p4AqBgvEYJ00AqpS4iHvMN+XUnFbl1dtz/WXir zzMEeLGabtxi/0B2F5GXxpelcqimbEToaXQA3coAIx7klN6PL4PJdgtkIed8CKU1KDiXHngwG T+mmSFlrMsKiViQmhXQNA+3y8G2CjlDpmgc/IAB+CAceTMx4g6SxyrVDLOuEBk/tOsPPiKpUg aXgmDc7tHfBbEtE9nqnNBhCGCva04mXJLdtYpjpta0HAS2xbUImR76LT9iAV2m0TDRrBNFjei k3at77g22UuSsYT6v5Jbv/5y5Dbp7MvXnCzKXkogU8EsTP4z96dXDfhBOaxsFC8a8kUctZgT2 VU45Zzp+KISusS1hDndx9l9nEYmzo6vp9V5KUsPthj5Zj1HVQGRXHZXujJbbO9w09FbRE45Ng eJl/4rkIuc0youi65u6Ps3LrhSe7QJyjJ8P1bQ6yJzHJx0PAmvPA8nl2eo7jBUfFBlmwsFi+U /WLDctSssYk3ER++ZJPo8BauJCku1oGI2jbQ/YmoZ6KAg89bNwpubkapXvfab4c8ImUPhwiFQ YSe9J1jKeggLnVOX0sRkm1A3zmBv++bDnO9yL2+PZ1+JKINkVFt4EebpUz4yddpe0naTZ5oe9 0+dM1odsy/CYYStRXFL87/dBWAfUfM2eN5Lq4A== Cc: Arnd Bergmann , Greg Kroah-Hartman , dri-devel@lists.freedesktop.org, linux-ide@vger.kernel.org, Ingo Molnar , "H. Peter Anvin" , Tejun Heo , akpm@linux-foundation.org, Linus Torvalds , Thomas Gleixner , Guenter Roeck , linux-media@vger.kernel.org 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 The setsign() macro gets called with an integer argument in a few places, leading to a harmless warning in gcc-7: arch/x86/math-emu/reg_add_sub.c: In function 'FPU_add': arch/x86/math-emu/reg_add_sub.c:80:48: error: ?: using integer constants in boolean context [-Werror=int-in-bool-context] This turns the integer into a boolean expression by comparing it to zero. Signed-off-by: Arnd Bergmann --- arch/x86/math-emu/fpu_emu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/math-emu/fpu_emu.h b/arch/x86/math-emu/fpu_emu.h index afbc4d805d66..c9c320dccca1 100644 --- a/arch/x86/math-emu/fpu_emu.h +++ b/arch/x86/math-emu/fpu_emu.h @@ -157,7 +157,7 @@ extern u_char const data_sizes_16[32]; #define signbyte(a) (((u_char *)(a))[9]) #define getsign(a) (signbyte(a) & 0x80) -#define setsign(a,b) { if (b) signbyte(a) |= 0x80; else signbyte(a) &= 0x7f; } +#define setsign(a,b) { if ((b) != 0) signbyte(a) |= 0x80; else signbyte(a) &= 0x7f; } #define copysign(a,b) { if (getsign(a)) signbyte(b) |= 0x80; \ else signbyte(b) &= 0x7f; } #define changesign(a) { signbyte(a) ^= 0x80; }