Subject: Re: [PATCH iwl-next] ice: clean up __ice_aq_get_set_rss_lut()

From: Simon Horman <[email-masked]>
Date: Tue, 6 Jun 2023 17:38:19 +0200

On Tue, Jun 06, 2023 at 01:11:49PM +0200, Przemek Kitszel wrote:

...

> diff --git a/drivers/net/ethernet/intel/ice/ice_common.c b/drivers/net/ethernet/intel/ice/ice_common.c
> index 6acb40f3c202..af4c8ddcafb0 100644
> --- a/drivers/net/ethernet/intel/ice/ice_common.c
> +++ b/drivers/net/ethernet/intel/ice/ice_common.c
> @@ -3869,6 +3869,30 @@ ice_aq_sff_eeprom(struct ice_hw *hw, u16 lport, u8 bus_addr,
>  	return status;
>  }
>  
> +static enum ice_lut_size ice_lut_type_to_size(enum ice_lut_type type)
> +{
> +	switch (type) {
> +	case ICE_LUT_VSI:
> +		return ICE_LUT_VSI_SIZE;
> +	case ICE_LUT_GLOBAL:
> +		return ICE_LUT_GLOBAL_SIZE;
> +	case ICE_LUT_PF:
> +		return ICE_LUT_PF_SIZE;
> +	}

Hi Przemek,

I see where you are going here, but gcc-12 W=1 wants a return here.

> +}
> +
> +static enum ice_aqc_lut_flags ice_lut_size_to_flag(enum ice_lut_size size)
> +{
> +	switch (size) {
> +	case ICE_LUT_VSI_SIZE:
> +		return ICE_AQC_LUT_SIZE_SMALL;
> +	case ICE_LUT_GLOBAL_SIZE:
> +		return ICE_AQC_LUT_SIZE_512;
> +	case ICE_LUT_PF_SIZE:
> +		return ICE_AQC_LUT_SIZE_2K;
> +	}

And here.

> +}
> +
>  /**
>   * __ice_aq_get_set_rss_lut
>   * @hw: pointer to the hardware structure

-- 
pw-bot: cr