From patchwork Fri Jul 14 09:25:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9840273 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 A0813602BD for ; Fri, 14 Jul 2017 09:28:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 919D82876A for ; Fri, 14 Jul 2017 09:28:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 863F228780; Fri, 14 Jul 2017 09:28:26 +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 3E6BD2876A for ; Fri, 14 Jul 2017 09:28:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A87396E7B1; Fri, 14 Jul 2017 09:28:24 +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 60F3D6E7B1 for ; Fri, 14 Jul 2017 09:28:22 +0000 (UTC) Received: from wuerfel.lan ([5.56.224.194]) by mrelayeu.kundenserver.de (mreue103 [212.227.15.145]) with ESMTPA (Nemesis) id 0MRzqc-1d3zeD3U8Q-00TCqE; Fri, 14 Jul 2017 11:27:32 +0200 From: Arnd Bergmann To: linux-kernel@vger.kernel.org, Karsten Keil , "David S. Miller" Subject: [PATCH 05/14] isdn: isdnloop: suppress a gcc-7 warning Date: Fri, 14 Jul 2017 11:25:17 +0200 Message-Id: <20170714092540.1217397-6-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:kQ2HP+eDMo4feZc2ZQxKsN1rGNrWrVywsltxi69wh6XVf7Ptvo9 GRBAgqT76nnApM/fjDINNk4evyOHMlVJ9FcvjBrfJfoemvipVMt3Tt/k+7sZ4xIl6wjqW8S euGW0k+puT7PMbs7qFqUxA5skkN28wHuB34OE9E5wMUHe1Xzs6RVzFdY+rBJoU+YFBWMsKp 4IgWCqsDitGE1WtVLDfdw== X-UI-Out-Filterresults: notjunk:1; V01:K0:f/HCPSxtnAg=:G/8IX5vkCqEu6v4TM2iJKA VG1yllc+fhE6bhtMjSMkK33jWN7ZGApFFJXuB5pXYdPvbgtbX2r0G1Ud56m60sL2rIMRaOAud rEtvui0no1hq+P4a5MrEkoklVSKj+RRqRw0dDqQmnT7bgtcvq5AcoucV9crBpeUlyRri2axE0 EqbiC6vc941DvvRtUzdS1r6NiSb5ECOpkQjp7MnHZvZPweiFhOJwOx69/82k8abDoYlCvMBN3 XbkhtVDzxaxmcCJxCalG/Q35uS0M1OYAVsNeMlmEmhNL2cBB9zUfHDdE8WNlJ4Ca2ogrnUxoM RUNZpTUlXjOgGpY2xyaHNkC1m53L5368+qJH7xU/YACIAGtIYd7CndfOpfQPhSywf8OBRNMlU qQFKuSL6mj6suHjvywuHwNh2VXus2x9Eh2JwPHkCYvdNxZgx72jH+6tUZJdYRmTCBgoQ0MeBw vP/YC4CZbgfka7gx/HHXz/fF9MHUK50ytcRFh73fd9tzNlde5AwY2ac7QRgjdEPs5emEv8CIX jSpVT8LaIgGimdplJPflMyc9kFV5h0OU6IbGOoI1gjRP/yYPLMt/q4mdb3PI44i/UyXojCc06 ZXu35S1095aPl64HPvkaLNu4IQ6DwInuHn0h95ad7Y04pMjWB6gCBEi4Qvv9LNAaxPkQXu3tg AHUSUfwqN5aductwnV0OYdGu+AbCfbR7bzF4YIO8LCmjQ8XUbaPE7Qxhlrb4GNV/DAPP5eCfj 9NswvNs+Zz6vLsSoqjyrlNFHBTy9cu85lqeVTw== Cc: Arnd Bergmann , Greg Kroah-Hartman , dri-devel@lists.freedesktop.org, linux-ide@vger.kernel.org, netdev@vger.kernel.org, Tejun Heo , akpm@linux-foundation.org, Linus Torvalds , 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 We test whether a bit is set in a mask here, which is correct but gcc warns about it as it thinks it might be confusing: drivers/isdn/isdnloop/isdnloop.c:412:37: error: ?: using integer constants in boolean context, the expression will always evaluate to 'true' [-Werror=int-in-bool-context] This replaces the negation of an integer with an equivalent comparison to zero, which gets rid of the warning. Signed-off-by: Arnd Bergmann --- drivers/isdn/isdnloop/isdnloop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/isdn/isdnloop/isdnloop.c b/drivers/isdn/isdnloop/isdnloop.c index 6ffd13466b8c..5792928b944d 100644 --- a/drivers/isdn/isdnloop/isdnloop.c +++ b/drivers/isdn/isdnloop/isdnloop.c @@ -409,7 +409,7 @@ isdnloop_sendbuf(int channel, struct sk_buff *skb, isdnloop_card *card) return -EINVAL; } if (len) { - if (!(card->flags & (channel) ? ISDNLOOP_FLAGS_B2ACTIVE : ISDNLOOP_FLAGS_B1ACTIVE)) + if ((card->flags & (channel) ? ISDNLOOP_FLAGS_B2ACTIVE : ISDNLOOP_FLAGS_B1ACTIVE) == 0) return 0; if (card->sndcount[channel] > ISDNLOOP_MAX_SQUEUE) return 0;