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 07303A00BE; Wed, 30 Oct 2019 09:01:29 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CE6211BDAC; Wed, 30 Oct 2019 09:01:28 +0100 (CET) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id E556D1B948 for ; Wed, 30 Oct 2019 09:01:26 +0100 (CET) Received: from mail-vk1-f200.google.com (mail-vk1-f200.google.com [209.85.221.200]) (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 516E4C0021D7 for ; Wed, 30 Oct 2019 08:01:26 +0000 (UTC) Received: by mail-vk1-f200.google.com with SMTP id 63so613230vkr.23 for ; Wed, 30 Oct 2019 01:01:26 -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=OrlUb2DqZHjbOY5wtImnlGyDMUmYzMJSbWQDDaPhVAM=; b=FK3WwGbU7RqY3xpcgHDLxydm0cqrbV5vPTf3PqZ79I9FrWJYkTA0MHqxw03pIGgITp 1j+W2XCPumnCjPD5LVE9xEkbcpzDtKMc/dq6ebXtHUJYuNIzZ7niPYEVjAW+qYln5JaP sUELZWs+Q8Q3cFfo+x//9quIJgSCCCphv0PUFUKQ1uf4cUDhN2jlIqC58TqfveT7ZBIM ZyGAsTZ7h5Leh13B57a6LmJ0OEhcX2vsZSgrLtCAz6TSwPKl+1nl24+is6EKVKqjzOA6 DPjnDf2HNpJyd/37UWH07sRRRQZ9X2JzkqL8oL8ceeJd1piFB/QX6XNirw/bIJwPiYZZ dmig== X-Gm-Message-State: APjAAAXGWwx1SeShSeYkZfe0ZpvHsK6KYUbnF0goxcTnhmd+GS3IN/3x aT5wyLwIUIujml+qCioIatRf3PtnhXNMY70PgMKhAZ9ZkmWFTl5MkMLH2U8by40RrU6EAkOmoam Z0Y1ifxQ0l/jNXL/Tfv0= X-Received: by 2002:a67:7d95:: with SMTP id y143mr4383343vsc.39.1572422485408; Wed, 30 Oct 2019 01:01:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqzZl8Nd7QPrJ5HS7khjBhm2Ah4Y0eI+aKmopMb9iNf4YLijE+BWe/VHWc3Rqw4Xf40GCs7YyfKxnqMc3GlNNxY= X-Received: by 2002:a67:7d95:: with SMTP id y143mr4383320vsc.39.1572422485075; Wed, 30 Oct 2019 01:01:25 -0700 (PDT) MIME-Version: 1.0 References: <20191001125315.6191-1-ktraynor@redhat.com> <20191001130405.7076-1-ktraynor@redhat.com> <20191001130405.7076-4-ktraynor@redhat.com> In-Reply-To: <20191001130405.7076-4-ktraynor@redhat.com> From: David Marchand Date: Wed, 30 Oct 2019 09:01:13 +0100 Message-ID: To: Kevin Traynor Cc: dev , Rosen Xu , dpdk stable Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH 5/9] net/ipn3ke: remove useless if statement X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, Oct 1, 2019 at 3:04 PM Kevin Traynor wrote: > > Coverity complains that this statement is not needed as the goto > label is on the next line anyway. Remove the if statement. > > 653 ret = ipn3ke_cfg_parse_i40e_pf_ethdev(afu_name, pf_name); > CID 337930 (#1 of 1): Identical code for different branches > (IDENTICAL_BRANCHES)identical_branches: The same code is executed > when the condition ret is true or false, because the code in the > if-then branch and after the if statement is identical. Should > the if statement be removed? > 654 if (ret) > 655 goto end; > implicit_else: The code from the above if-then branch is identical > to the code after the if statement. > 656end: > > Coverity issue: 337930 > Fixes: c01c748e4ae6 ("net/ipn3ke: add new driver") > Cc: rosen.xu@intel.com > Cc: stable@dpdk.org > > Signed-off-by: Kevin Traynor > --- > drivers/net/ipn3ke/ipn3ke_ethdev.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/net/ipn3ke/ipn3ke_ethdev.c b/drivers/net/ipn3ke/ipn3ke_ethdev.c > index c226d6313..282295f49 100644 > --- a/drivers/net/ipn3ke/ipn3ke_ethdev.c > +++ b/drivers/net/ipn3ke/ipn3ke_ethdev.c > @@ -652,6 +652,5 @@ ipn3ke_cfg_probe(struct rte_vdev_device *dev) > > ret = ipn3ke_cfg_parse_i40e_pf_ethdev(afu_name, pf_name); > - if (ret) > - goto end; > + > end: > if (kvlist) > -- > 2.21.0 > Reviewed-by: David Marchand -- David Marchand