Re: [PATCH net-next] net/mlx5i: avoid unused function warning for mlx5i_flow_type_mask
From: Saeed Mahameed
Date: Mon Oct 25 2021 - 16:00:40 EST
On Fri, 2021-10-22 at 08:47 +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@xxxxxxxx>
>
> Without CONFIG_MLX5_EN_RXNFC, the function is unused, breaking the
> build with CONFIG_WERROR:
>
> mlx5/core/ipoib/ethtool.c:36:12: error: unused function
> 'mlx5i_flow_type_mask' [-Werror,-Wunused-function]
> static u32 mlx5i_flow_type_mask(u32 flow_type)
>
> We could add another #ifdef or mark this function inline, but
> replacing the existing #ifdef with a __maybe_unused seems best
> because that improves build coverage and avoids introducing
> similar problems the next time this code changes.
>
Hi Arnd, thanks for your patch,
we have a pending patch that simply moves mlx5i_flow_type_mask() into
the #ifdef, where this function is only used
will submit it shortly.
Thanks again for your patch.