OSDN Git Service

net/mlx5: Fix unused function warning of mlx5i_flow_type_mask
authorShay Drory <shayd@nvidia.com>
Mon, 18 Oct 2021 06:18:39 +0000 (09:18 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Mon, 25 Oct 2021 20:51:18 +0000 (13:51 -0700)
commit038e5e471874d26881d5f3b234c78e41a71ad606
treef4b1730ac5613114954c3d6525a47ea62bb0c4cc
parenta64c5edbd20ec042fcd719c6aec0574e68db618b
net/mlx5: Fix unused function warning of mlx5i_flow_type_mask

The cited commit is causing unused-function warning[1] when
CONFIG_MLX5_EN_RXNFC is not set.
Fix this by moving the function into the ifdef, where it's only used

[1]
warning: ‘mlx5i_flow_type_mask’ defined but not used [-Wunused-function]

Fixes: 9fbe1c25ecca ("net/mlx5i: Enable Rx steering for IPoIB via ethtool")
Signed-off-by: Shay Drory <shayd@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/ipoib/ethtool.c