]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net/mlx5e: Fix feature check per profile
authorAya Levin <ayal@nvidia.com>
Tue, 21 Dec 2021 13:16:32 +0000 (15:16 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Fri, 7 Jan 2022 00:22:54 +0000 (16:22 -0800)
Remove redundant space when constructing the feature's enum. Validate
against the indented enum value.

Fixes: c6b8e1836242 ("net/mlx5e: Use bitmap field for profile features")
Signed-off-by: Aya Levin <ayal@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en.h

index c5f959a9e14b1f93d2dcb48c29fee27b40022df3..812e6810cb3bc7e7802a3944a73a35bddb2a20e7 100644 (file)
@@ -984,7 +984,7 @@ struct mlx5e_profile {
 };
 
 #define mlx5e_profile_feature_cap(profile, feature)    \
-       ((profile)->features & (MLX5E_PROFILE_FEATURE_## feature))
+       ((profile)->features & BIT(MLX5E_PROFILE_FEATURE_##feature))
 
 void mlx5e_build_ptys2ethtool_map(void);