]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Fix incompatible casting
authorAya Levin <ayal@nvidia.com>
Tue, 25 May 2021 12:35:25 +0000 (15:35 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 2 Jun 2021 01:30:19 +0000 (18:30 -0700)
commit7eaba15d462b21eace1d6406552d5e8e504ed177
treea95c03d6906e2e5513b899a64249e5f27a47b849
parente1c8ae91914c3bc762da8cf89f242292b004e0a9
net/mlx5e: Fix incompatible casting

Device supports setting of a single fec mode at a time, enforce this
by bitmap_weight == 1. Input from fec command is in u32, avoid cast to
unsigned long and use bitmap_from_arr32 to populate bitmap safely.

Fixes: aa40eabab045 ("net/mlx5e: Enforce setting of a single FEC mode")
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_ethtool.c