]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Fix warnings around parsing of TC pedit actions
authorOr Gerlitz <ogerlitz@mellanox.com>
Tue, 9 May 2017 10:37:26 +0000 (13:37 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Tue, 23 May 2017 13:23:31 +0000 (16:23 +0300)
commitc6878931d5be9f7f51cdf94702e167079b09cd88
treee378e7c729efcf8b4aefab77ac33cc2231ebe68c
parent8d2bb2f8310ccf8acdf8ed3ea77eec0ab4bd9514
net/mlx5e: Fix warnings around parsing of TC pedit actions

The sparse tool emits these correct complaints:

drivers/net/ethernet/mellanox/mlx5/core//en_tc.c:1005:25: warning: cast to restricted __be32
drivers/net/ethernet/mellanox/mlx5/core//en_tc.c:1007:25: warning: cast to restricted __be16

The value is provided from user-space in network order, but there's
no way for them to realize that, avoid the warnings by casting to the
appropriate type.

Fixes: 0a1fcdab0706 ('net/mlx5e: Add parsing of TC pedit actions to HW format')
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Reported-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Paul Blakey <paulb@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c