net/mlx5e: Fix incompatible casting
stable inclusion from stable-5.10.43 commit c1ea8c0e71ead1efaaba33e241c1e7d35e9cbf51 bugzilla: 109284 CVE: NA -------------------------------- [ Upstream commit d8ec9200 ] 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: 4bd9d507 ("net/mlx5e: Enforce setting of a single FEC mode") Signed-off-by: NAya Levin <ayal@nvidia.com> Reviewed-by: NTariq Toukan <tariqt@nvidia.com> Signed-off-by: NSaeed Mahameed <saeedm@nvidia.com> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NChen Jun <chenjun102@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Showing
想要评论请 注册 或 登录