]> 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)
commit923a1af6a01a595d335aa9904c4906b430ad33bf
treee378e7c729efcf8b4aefab77ac33cc2231ebe68c
parent4f70d26dd4cba8ed7b66545c5dbf80abd9dde093
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: 0a453a2a4d35 ('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