[dpdk-dev] [PATCH 02/10] common/sfc_efx/base: delete redundant handling

Andrew Rybchenko andrew.rybchenko at oktetlabs.ru
Tue Apr 20 11:33:09 CEST 2021


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 at dpdk.org
> 
> Signed-off-by: Min Hu (Connor) <humin29 at huawei.com>

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);
> 



More information about the dev mailing list