From: David S. Miller Date: Tue, 18 Aug 2015 04:22:26 +0000 (-0700) Subject: mlx5e: Fix sparse warnings in mlx5e_handle_csum(). X-Git-Tag: v4.9.8~3644^2~144 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ecf842f65c76f7dc2420a5295dfbf01ec7232320;p=platform%2Fkernel%2Flinux-rpi3.git mlx5e: Fix sparse warnings in mlx5e_handle_csum(). >> drivers/net/ethernet/mellanox/mlx5/core/en_rx.c:173:44: sparse: incorrect type in argument 1 (different base types) drivers/net/ethernet/mellanox/mlx5/core/en_rx.c:173:44: expected restricted __sum16 [usertype] n drivers/net/ethernet/mellanox/mlx5/core/en_rx.c:173:44: got restricted __be16 [usertype] check_sum Reported-by: kbuild test robot Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c index caea062..cf00985 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c @@ -170,7 +170,7 @@ static inline void mlx5e_handle_csum(struct net_device *netdev, skb->ip_summed = CHECKSUM_UNNECESSARY; } else if (is_first_ethertype_ip(skb)) { skb->ip_summed = CHECKSUM_COMPLETE; - skb->csum = csum_unfold(cqe->check_sum); + skb->csum = csum_unfold((__force __sum16)cqe->check_sum); rq->stats.csum_sw++; } else { goto csum_none;