From patchwork Tue Nov 15 17:34:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leon Romanovsky X-Patchwork-Id: 13044020 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D7CF8C433FE for ; Tue, 15 Nov 2022 17:34:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230095AbiKORev (ORCPT ); Tue, 15 Nov 2022 12:34:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229693AbiKORet (ORCPT ); Tue, 15 Nov 2022 12:34:49 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 163D22ED5C for ; Tue, 15 Nov 2022 09:34:48 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id A67F5B81A42 for ; Tue, 15 Nov 2022 17:34:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 82DB8C433D6; Tue, 15 Nov 2022 17:34:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668533685; bh=tdU1JsnEb2QzHwjmx/G+2WiUZY6BzPfwrF6VIgp3flo=; h=From:To:Cc:Subject:Date:From; b=NBz2Jn40x6vfuvqMC3/8IW1jb0/MQLmunIgLy7k7qD0TizvLTK4NmRYQZFHVHta6z GZbQZGUAXi+ap7tXKz2U+JOUFAB3a4uvPjdH9W/R8GE8XlPH72Y3MIpxIZbgpGAhXX OokZaW5OLBZMNTwguiTAbj2/PmNyTrFjULAMDNIXX1jLFA4XS0kemDZoNH5O5vqQPO AFAGp0F5AhkQi7Yh+1GkKsSisYyVpIoFNsC0yEoTleBNFfqwCm7YQ3w3OrZZ9prnyU J15YEAq5Cqe0DtLViQxJ+bB5fjxy0IJE2m3iD4Q1enk7TOcRCo6vlljbT8YipM/bq6 l85UDybeCtKFw== From: Leon Romanovsky To: "David S . Miller" , Jakub Kicinski Cc: Leon Romanovsky , Derek Chickles , Eric Dumazet , Felix Manlunas , kernel test robot , netdev@vger.kernel.org, Paolo Abeni , Satanand Burla , Zhengchao Shao Subject: [PATCH net] net: liquidio: simplify if expression Date: Tue, 15 Nov 2022 19:34:39 +0200 Message-Id: <9845cbd62721437f946035669381a9719240fc89.1668533583.git.leonro@nvidia.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Leon Romanovsky Fix the warning reported by kbuild: cocci warnings: (new ones prefixed by >>) >> drivers/net/ethernet/cavium/liquidio/lio_main.c:1797:54-56: WARNING !A || A && B is equivalent to !A || B drivers/net/ethernet/cavium/liquidio/lio_main.c:1827:54-56: WARNING !A || A && B is equivalent to !A || B Fixes: 8979f428a4af ("net: liquidio: release resources when liquidio driver open failed") Reported-by: kernel test robot Signed-off-by: Leon Romanovsky Reviewed-by: Saeed Mahameed --- The fixed patch was in net, so sending the fix to net too. --- drivers/net/ethernet/cavium/liquidio/lio_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/cavium/liquidio/lio_main.c b/drivers/net/ethernet/cavium/liquidio/lio_main.c index 75771825c3f9..98793b2ac2c7 100644 --- a/drivers/net/ethernet/cavium/liquidio/lio_main.c +++ b/drivers/net/ethernet/cavium/liquidio/lio_main.c @@ -1794,7 +1794,7 @@ static int liquidio_open(struct net_device *netdev) ifstate_set(lio, LIO_IFSTATE_RUNNING); - if (!OCTEON_CN23XX_PF(oct) || (OCTEON_CN23XX_PF(oct) && !oct->msix_on)) { + if (!OCTEON_CN23XX_PF(oct) || !oct->msix_on) { ret = setup_tx_poll_fn(netdev); if (ret) goto err_poll; @@ -1824,7 +1824,7 @@ static int liquidio_open(struct net_device *netdev) return 0; err_rx_ctrl: - if (!OCTEON_CN23XX_PF(oct) || (OCTEON_CN23XX_PF(oct) && !oct->msix_on)) + if (!OCTEON_CN23XX_PF(oct) || !oct->msix_on) cleanup_tx_poll_fn(netdev); err_poll: if (lio->ptp_clock) {