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 D3353A0579; Tue, 20 Apr 2021 11:33:10 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BB0F741529; Tue, 20 Apr 2021 11:33:10 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id D00C2411A5 for ; Tue, 20 Apr 2021 11:33:09 +0200 (CEST) Received: from [192.168.38.17] (aros.oktetlabs.ru [192.168.38.17]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id 44A857F523; Tue, 20 Apr 2021 12:33:09 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 44A857F523 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1618911189; bh=B3EP89G/S7UsisV4g739kASE47NwBEevJ/78b9rl+9M=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=vxf4PlhZenrz+h/klC/iFeGGq+onXwjD6GFEeUVH5WnRW+QV2Zjl6xPloPfrveViK K6lEyY4BikDJHC3rZyY1oV+55rWYaO4x5bjadsW/ag9qITlfSj1cRO169i9JSbAFgQ 9aMWDo/Qqr7lMqfJfzZMgzhM8x+5mGwDeeDj0DBE= To: "Min Hu (Connor)" , dev@dpdk.org Cc: ferruh.yigit@intel.com, cristian.dumitrescu@intel.com, jerinj@marvell.com, jianjay.zhou@huawei.com, jia.guo@intel.com, g.singh@nxp.com, hemant.agrawal@nxp.com, orika@nvidia.com References: <1618839289-33224-1-git-send-email-humin29@huawei.com> <1618839289-33224-3-git-send-email-humin29@huawei.com> From: Andrew Rybchenko Organization: OKTET Labs Message-ID: <40269202-070e-c543-391e-42c2eaaa4166@oktetlabs.ru> Date: Tue, 20 Apr 2021 12:33:09 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 MIME-Version: 1.0 In-Reply-To: <1618839289-33224-3-git-send-email-humin29@huawei.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 02/10] common/sfc_efx/base: delete redundant handling 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 Sender: "dev" On 4/19/21 4:34 PM, Min Hu (Connor) wrote: > the default case in 'rhead_nic_get_bar_region' is unreachable. Why? May be it is true right now, but default case is required to handle future changes in enum and missing update here. > > This patch fixed that. > > Fixes: 3c1c5cc4a786 ("common/sfc_efx/base: add Riverhead support to NIC module") > Cc: stable@dpdk.org > > Signed-off-by: Min Hu (Connor) Nack > --- > drivers/common/sfc_efx/base/rhead_nic.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/common/sfc_efx/base/rhead_nic.c b/drivers/common/sfc_efx/base/rhead_nic.c > index f2c18c1..b9af348 100644 > --- a/drivers/common/sfc_efx/base/rhead_nic.c > +++ b/drivers/common/sfc_efx/base/rhead_nic.c > @@ -483,8 +483,7 @@ rhead_nic_get_bar_region( > break; > > default: > - rc = EINVAL; > - goto fail1; > + break; > } > > return (0); >