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: 9840309 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 9DE45602BD for ; Fri, 14 Jul 2017 09:30:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 901B328788 for ; Fri, 14 Jul 2017 09:30:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8508E2878F; Fri, 14 Jul 2017 09:30:04 +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.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=unavailable 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 40C3A28788 for ; Fri, 14 Jul 2017 09:30:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753784AbdGNJ3W (ORCPT ); Fri, 14 Jul 2017 05:29:22 -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 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 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-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 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; }