]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: DR: Fix incorrect type in return expression
authorSaeed Mahameed <saeedm@mellanox.com>
Thu, 28 May 2020 08:14:31 +0000 (01:14 -0700)
committerSaeed Mahameed <saeedm@mellanox.com>
Sat, 30 May 2020 04:20:21 +0000 (21:20 -0700)
commit45bb76be6ed5f41a609f7513451099376fa5dac1
tree673c3d2e9937c634f5d88d7d671334dec8a91fde
parentfe70476940dbf453479886c3d3ad4e844d179178
net/mlx5: DR: Fix incorrect type in return expression

dr_ste_crc32_calc() calculates crc32 and should return it in HW format.
It is being used to calculate a u32 index, hence we force the return value
of u32 to avoid the sparse warning:

drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste.c:115:16:
warning: incorrect type in return expression (different base types)
    expected unsigned int
    got restricted __be32 [usertype]

Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Reviewed-by: Mark Bloch <markb@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste.c