Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next] net: fix two sparse warnings introduced by IGMP/MLD parsing exports
@ 2015-05-04 22:19 Linus Lüssing
  2015-05-04 23:20 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Linus Lüssing @ 2015-05-04 22:19 UTC (permalink / raw)
  To: netdev, linux-kernel, David S. Miller; +Cc: Linus Lüssing

> net/core/skbuff.c:4108:13: sparse: incorrect type in assignment (different base types)
> net/ipv6/mcast_snoop.c:63 ipv6_mc_check_exthdrs() warn: unsigned 'offset' is never less than zero.

Introduced by 9afd85c9e4552b276e2f4cfefd622bdeeffbbf26
("net: Export IGMP/MLD message validation code")

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
---
 net/core/skbuff.c      |    2 +-
 net/ipv6/mcast_snoop.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 1e4278a..b9eb90b 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -4093,7 +4093,7 @@ struct sk_buff *skb_checksum_trimmed(struct sk_buff *skb,
 {
 	struct sk_buff *skb_chk;
 	unsigned int offset = skb_transport_offset(skb);
-	int ret;
+	__sum16 ret;
 
 	skb_chk = skb_checksum_maybe_trim(skb, transport_len);
 	if (!skb_chk)
diff --git a/net/ipv6/mcast_snoop.c b/net/ipv6/mcast_snoop.c
index 1a2cbc1..df8afe5 100644
--- a/net/ipv6/mcast_snoop.c
+++ b/net/ipv6/mcast_snoop.c
@@ -47,7 +47,7 @@ static int ipv6_mc_check_ip6hdr(struct sk_buff *skb)
 static int ipv6_mc_check_exthdrs(struct sk_buff *skb)
 {
 	const struct ipv6hdr *ip6h;
-	unsigned int offset;
+	int offset;
 	u8 nexthdr;
 	__be16 frag_off;
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] net: fix two sparse warnings introduced by IGMP/MLD parsing exports
  2015-05-04 22:19 [PATCH net-next] net: fix two sparse warnings introduced by IGMP/MLD parsing exports Linus Lüssing
@ 2015-05-04 23:20 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2015-05-04 23:20 UTC (permalink / raw)
  To: linus.luessing; +Cc: netdev, linux-kernel

From: Linus Lüssing <linus.luessing@c0d3.blue>
Date: Tue,  5 May 2015 00:19:35 +0200

>> net/core/skbuff.c:4108:13: sparse: incorrect type in assignment (different base types)
>> net/ipv6/mcast_snoop.c:63 ipv6_mc_check_exthdrs() warn: unsigned 'offset' is never less than zero.
> 
> Introduced by 9afd85c9e4552b276e2f4cfefd622bdeeffbbf26
> ("net: Export IGMP/MLD message validation code")
> 
> Reported-by: kbuild test robot <fengguang.wu@intel.com>
> Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>

Applied, thank you.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-05-04 23:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-04 22:19 [PATCH net-next] net: fix two sparse warnings introduced by IGMP/MLD parsing exports Linus Lüssing
2015-05-04 23:20 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox