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: 9840291 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 B3395602BD for ; Fri, 14 Jul 2017 09:29:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A49672876A for ; Fri, 14 Jul 2017 09:29:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9795528777; Fri, 14 Jul 2017 09:29:01 +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 2CB212876A for ; Fri, 14 Jul 2017 09:29:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753718AbdGNJ2k (ORCPT ); Fri, 14 Jul 2017 05:28:40 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:53470 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751353AbdGNJ2i (ORCPT ); Fri, 14 Jul 2017 05:28:38 -0400 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" 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 , netdev@vger.kernel.org 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== 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 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;