Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: fix two sparse warnings introduced by IGMP/MLD parsing exports

> 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>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Linus Lüssing and committed by
David S. Miller
fcba67c9 f9161585

+2 -2
+1 -1
net/core/skbuff.c
··· 4093 4093 { 4094 4094 struct sk_buff *skb_chk; 4095 4095 unsigned int offset = skb_transport_offset(skb); 4096 - int ret; 4096 + __sum16 ret; 4097 4097 4098 4098 skb_chk = skb_checksum_maybe_trim(skb, transport_len); 4099 4099 if (!skb_chk)
+1 -1
net/ipv6/mcast_snoop.c
··· 47 47 static int ipv6_mc_check_exthdrs(struct sk_buff *skb) 48 48 { 49 49 const struct ipv6hdr *ip6h; 50 - unsigned int offset; 50 + int offset; 51 51 u8 nexthdr; 52 52 __be16 frag_off; 53 53