Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753742AbdGNJ2l (ORCPT ); Fri, 14 Jul 2017 05:28:41 -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 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-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1141 Lines: 28 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; -- 2.9.0