From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C58B4A00BE for ; Wed, 30 Oct 2019 17:28:02 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9C3061C0AD; Wed, 30 Oct 2019 17:28:02 +0100 (CET) Received: from mail-oi1-f194.google.com (mail-oi1-f194.google.com [209.85.167.194]) by dpdk.org (Postfix) with ESMTP id 740271C0AD for ; Wed, 30 Oct 2019 17:28:01 +0100 (CET) Received: by mail-oi1-f194.google.com with SMTP id n16so2511000oig.2 for ; Wed, 30 Oct 2019 09:28:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Qmw7FSGtTkUcJeIP2g+oRPUDwuV1gMxFbQ8QRZPuM/M=; b=fTylETHkuzG3Xs1bXDDc9U+V5MdPvhzSm5qhWJCwxyUwv5+lu064zwnoKqJq2fCLwT W/mA9hTplQkI6gN9tJjioiTst3F3EX2+uEO8yvnjhmpN13IeY2+QXAVEijFEOpzjnSLN uXOKiTRBn8yxUeiRplIyxY1labcnPDdlSIPWQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Qmw7FSGtTkUcJeIP2g+oRPUDwuV1gMxFbQ8QRZPuM/M=; b=GzT+1HcB4U9y6XL2nOYPPFUgc+pKMUWOuoCzS7puq7dgcFGshusuczNqdeFMk5CGPK xFByx+UDU0XANTCKs4Xe+fh429rHsgSnOXWJSgLq2NQLSQugIlC0f6qBI/i/aL5MIVR/ g4YZIt4Yq/niqiN106qpccYqh14RalPnhRTJwqifO85CKELfM3cDSvazhqtGR4nPglNz LmRVFVthKm/vZxbDpzU+DX1bwydLMj4yPcQ7G1Vu3tLeYsAclaC6kOfxZdu75HnJowfX odCl0zqLIjhtDVO7ZSCjwNEMa8jLqktQzUhcXLaPVk7BKesWONLvEebdtObDNAURflpo Rwow== X-Gm-Message-State: APjAAAXqxE/n62lq2PPrtrCrQKK2kXCdPk2uROuDuFnC22yuQXqB4M6Z FHcjt+BTgaIr2aOVBkocYEztob9+L/Ve60x/1fTAag== X-Google-Smtp-Source: APXvYqzmDBb4dG/hWmYUKxMNxwHbFc/byj1XKdt8kuHn/U8p2O/C0sQpasQgpP9uEe4Nm0Xr71w5d7hsNElNAiKAGFk= X-Received: by 2002:aca:1a13:: with SMTP id a19mr47858oia.168.1572452880639; Wed, 30 Oct 2019 09:28:00 -0700 (PDT) MIME-Version: 1.0 References: <20191001125315.6191-1-ktraynor@redhat.com> <20191001130405.7076-1-ktraynor@redhat.com> <20191001130405.7076-2-ktraynor@redhat.com> In-Reply-To: From: Ajit Khaparde Date: Wed, 30 Oct 2019 09:27:43 -0700 Message-ID: To: David Marchand Cc: Kevin Traynor , dev , Lance Richardson , dpdk stable Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH 3/9] net/bnxt: remove logically dead code X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" On Wed, Oct 30, 2019 at 12:43 AM David Marchand wrote: > Hello Ajit, Kevin, > > On Wed, Oct 2, 2019 at 3:29 AM Ajit Khaparde > wrote: > > > > On Tue, Oct 1, 2019 at 6:04 AM Kevin Traynor > wrote: > > > > > If rc contains a non-zero return code from bnxt_hwrm_send_message(), > > > HWRM_CHECK_RESULT_SILENT() will return. > > > > > > Just after that code, there is an 'if (!rc) {...} else {...}'. > > > Coverity is complaining that this if else statement is dead code as > > > rc will always be 0 if that code is reached. > > > > > > 4309 rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), > > > BNXT_USE_CHIMP_MB); > > > cond_const: Condition rc, taking false branch. > > > Now the value of rc is equal to 0. > > > 4310 HWRM_CHECK_RESULT_SILENT(); > > > 4311 > > > const: At condition rc, the value of rc must be equal to 0. > > > dead_error_condition: The condition !rc must be true. > > > 4312 if (!rc) { > > > > > > [snip] > > > > > > 4373 } else { > > > CID 343450 (#1 of 1): Logically dead code > > > (DEADCODE)dead_error_line: Execution cannot > > > reach this statement: rc = 0;. > > > 4374 rc = 0; > > > 4375 } > > > > > > Coverity issue: 343450 > > > Fixes: f8168ca0e690 ("net/bnxt: support thor controller") > > > Cc: lance.richardson@broadcom.com > > > Cc: stable@dpdk.org > > > > > > Signed-off-by: Kevin Traynor > > > > > Acked-by: Ajit Khaparde > > I can see a *really* close patch has been submitted the day after. > http://patchwork.dpdk.org/patch/58352/ > > And merged after a v3: > > https://git.dpdk.org/dpdk/commit/?id=b4f74051165560aa81814433dea7e6eb0bdb32b9 > > So I suppose this patch can be dropped. > > Yes. That makes sense. Thanks for checking. Thanks Ajit > > -- > David Marchand >