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 862A4A00BE for ; Wed, 30 Oct 2019 08:43:27 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 612E61BEC1; Wed, 30 Oct 2019 08:43:27 +0100 (CET) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 75DDB1BEB4 for ; Wed, 30 Oct 2019 08:43:24 +0100 (CET) Received: from mail-vk1-f197.google.com (mail-vk1-f197.google.com [209.85.221.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C65205AFE3 for ; Wed, 30 Oct 2019 07:43:23 +0000 (UTC) Received: by mail-vk1-f197.google.com with SMTP id n6so598142vke.22 for ; Wed, 30 Oct 2019 00:43:23 -0700 (PDT) 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=Op7cU/MRAz9RYyHstc+GPqljAuzSFumgRhkJ7FnI6jo=; b=czfOAfOwgAdzrGttEx4mOgVGbHVCO4g/aSYl5zGLW0SDg9QuWsgB/Hjn/NH2SC46hU Ipx9GuOmKloSCuhs0rPYXPG6q71TH799lXeghJXIQ0UHqjHQthfv7aiwK8lIyHLwlGaq fHV3bN66SABVikk1H4gw6Dm7LgAE7cm3qYoWF5dInyHellTqMM2oATzml69wRveanGQE A8TUHUklzNBvDaB7TRzvMtHfJpRp8M98WNEAlUlebwk7vBnaxD74HiSStaODIB4eWZqA CA5tcYRln45FVUlCLcnuZYpiFGKreX1Z7X6IrRary5colcC/2rvuGen7KTFMVYBOMJD/ pL9A== X-Gm-Message-State: APjAAAWx/KNb+8srWzvS8H7bYZq5QYW0BabEbGOGtP2w4vXMuIFK7WxZ NzYSiE6a2zZ70/jZc+QKePWy74GhgIh3ytLUDFqyvnZrjFKBy7q+Z+1sbGgo+MWZMwuV7vfmc1I T6jMRnWnRFzR/1JOpkvToUv8= X-Received: by 2002:a1f:60ce:: with SMTP id u197mr8801342vkb.80.1572421402595; Wed, 30 Oct 2019 00:43:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqzXA3r/2tJEe+9Z3NPTdiYMtaxyd8ywpSgi3LkNuaBerDKzyu9mXb0frOyf77pYee+aiNmQOwcoPEpmaY87QKU= X-Received: by 2002:a1f:60ce:: with SMTP id u197mr8801337vkb.80.1572421402208; Wed, 30 Oct 2019 00:43:22 -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: David Marchand Date: Wed, 30 Oct 2019 08:43:10 +0100 Message-ID: To: Ajit Khaparde , Kevin Traynor Cc: dev , Lance Richardson , dpdk stable Content-Type: text/plain; charset="UTF-8" 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" 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. -- David Marchand