Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753800AbdGNJ3Z (ORCPT ); Fri, 14 Jul 2017 05:29:25 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:63044 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753471AbdGNJ3T (ORCPT ); Fri, 14 Jul 2017 05:29:19 -0400 From: Arnd Bergmann To: linux-kernel@vger.kernel.org, Bill Metzenthen , x86@kernel.org Cc: Greg Kroah-Hartman , Linus Torvalds , Tejun Heo , Guenter Roeck , linux-ide@vger.kernel.org, linux-media@vger.kernel.org, akpm@linux-foundation.org, dri-devel@lists.freedesktop.org, Arnd Bergmann , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" 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== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1167 Lines: 29 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; } -- 2.9.0