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)
commite3ca4e0583a02a04503d9c827fb5c5d50abc4ff5
treee378e7c729efcf8b4aefab77ac33cc2231ebe68c
parentd824bf3fe2d352fc2c52b7ede05b1a0e95d946be
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: d79b6df6b10a ('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