[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20150817.212303.155757005721528680.davem@davemloft.net>
Date: Mon, 17 Aug 2015 21:23:03 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: fengguang.wu@...el.com
Cc: achiad@...lanox.com, kbuild-all@...org, netdev@...r.kernel.org
Subject: Re: [net-next:master 904/905]
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c:173:44: sparse: incorrect
type in argument 1 (different base types)
From: kbuild test robot <fengguang.wu@...el.com>
Date: Tue, 18 Aug 2015 09:16:07 +0800
> tree: git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
> head: 9cd3778cd7e8f165675705511cfcd4ea6eb88d27
> commit: bbceefce9adfc9cf7b4110727c96c841ba8c7964 [904/905] net/mlx5e: Support RX CHECKSUM_COMPLETE
> reproduce:
> # apt-get install sparse
> git checkout bbceefce9adfc9cf7b4110727c96c841ba8c7964
> make ARCH=x86_64 allmodconfig
> make C=1 CF=-D__CHECK_ENDIAN__
>
>
> sparse warnings: (new ones prefixed by >>)
>
>>> 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
Thanks, I've committed the following:
====================
[PATCH] 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 <fengguang.wu@...el.com>
Signed-off-by: David S. Miller <davem@...emloft.net>
---
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists