From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 43EDC45C7A; Tue, 12 Nov 2024 18:46:50 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4CCC04067E; Tue, 12 Nov 2024 18:46:32 +0100 (CET) Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) by mails.dpdk.org (Postfix) with ESMTP id 22A8940655 for ; Tue, 12 Nov 2024 18:46:29 +0100 (CET) Received: by mail-pf1-f174.google.com with SMTP id d2e1a72fcca58-71e5130832aso4713172b3a.0 for ; Tue, 12 Nov 2024 09:46:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1731433588; x=1732038388; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ypB9tiVDjK88VqXA2EsM6jYZ/TmSPCw//kNLLmpVytM=; b=ZKZKaJRPaGxsFOoBrNWu1sMNHj4YLR1FCk5NvJ8Lde1lWjWvRZ0yD/UHC1sxS4RTtq vgC5w4v5F3y/sRxxyURNGa5AayIqyDMurMrdDGMcwpn5jJPPL01kKyCsOZY4WtC1j8jP sf4AXnh2lj4ukyPXkvtJ/240OQzmkhDWdiYAL9ZB+83xBEKoN2jnfr6ZmiHGIY4VsnQz 02xlzIDN2nJGn+svpI1RtlBsqqjAxUqei9sRtm3yfeDDQ+29W6cp2aaMMvs0V5cHcLi6 vmhr/Q2lpr6H3Aa+j6lCYQHf1q2WUuv92IOhiZ6y/kP9CyY3ezAhwhORo0shXIqO/jqE yMRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731433588; x=1732038388; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ypB9tiVDjK88VqXA2EsM6jYZ/TmSPCw//kNLLmpVytM=; b=YFmhEkhIpJJcofufB04WJjzr97re6KvFY0nK4oXko/DCgIyiiBF2R11QLMgRYpUyos rYN0mDXCKAJtj2KedwCg1MTECamnNJ6RgbUytssbkHinxgHExmTUcfB6m0OFnfd+zqMp Xlln1z5SoTOowKFwxBZkucq/JP/ifSZQ5p1SnlC0uqHpy8H4+klPdxLx26U4FV03tRIX Rj0T/GKtCQAnBb9G3OX379a5TXUXtWhUdkx6bUpZ31IjZx5duB3CccEXSGpiBnFS7Dvm BpgAoxjxsnl4qAob5IvqxMc22bXAGU+DGkLDsBzwzToxm3MSEiB+AMBeYkuI7VTVgfHc SfLg== X-Gm-Message-State: AOJu0YxX5WDbPYkRDT1JW6lgU/c08rBaAsHt1Pj2twNaIN3vcXeLnIjO mKrogh4LRMNUcHsCxr7tw4qFR1rl2US0gVMIvcNFzi5vY2/1dm8Je9ANSDuaT23IKOcX20S591G qyF0= X-Google-Smtp-Source: AGHT+IEfKRDWBNxVWhxmq7qUC4Ww1scRrDEYd+m/KOjLiXowzNeoKYAM/4lqfxTWSJ2qJXz76cGRlA== X-Received: by 2002:a05:6a00:39a2:b0:71e:1314:899a with SMTP id d2e1a72fcca58-7241335bc87mr22817968b3a.20.1731433588336; Tue, 12 Nov 2024 09:46:28 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72407863dd8sm11846758b3a.26.2024.11.12.09.46.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Nov 2024 09:46:27 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Julien Aube , Harish Patil Subject: [PATCH 4/4] net/bnx2x: fix duplicate branch Date: Tue, 12 Nov 2024 09:43:56 -0800 Message-ID: <20241112174613.326565-5-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241112174613.326565-1-stephen@networkplumber.org> References: <20241112174613.326565-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Coverity spotted that both legs of the conditional are the same. Looking at kernel driver there is additional code there, but the kernel driver supports Wake On Lan, and DPDK does not. Coverity issue: 362072 Fixes: 540a211084a7 ("bnx2x: driver core") Signed-off-by: Stephen Hemminger --- drivers/net/bnx2x/bnx2x.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c index d96fcb55c9..51e5cabf7b 100644 --- a/drivers/net/bnx2x/bnx2x.c +++ b/drivers/net/bnx2x/bnx2x.c @@ -1623,16 +1623,12 @@ static int bnx2x_nic_unload_no_mcp(struct bnx2x_softc *sc) } /* request unload mode from the MCP: COMMON, PORT or FUNCTION */ -static uint32_t bnx2x_send_unload_req(struct bnx2x_softc *sc, int unload_mode) +static uint32_t bnx2x_send_unload_req(struct bnx2x_softc *sc, int unload_mode __rte_unused) { uint32_t reset_code = 0; /* Select the UNLOAD request mode */ - if (unload_mode == UNLOAD_NORMAL) { - reset_code = DRV_MSG_CODE_UNLOAD_REQ_WOL_DIS; - } else { - reset_code = DRV_MSG_CODE_UNLOAD_REQ_WOL_DIS; - } + reset_code = DRV_MSG_CODE_UNLOAD_REQ_WOL_DIS; /* Send the request to the MCP */ if (!BNX2X_NOMCP(sc)) { -- 2.45.2