CC: [email protected]
TO: Frank Wunderlich <[email protected]>

tree:   https://github.com/frank-w/BPI-R2-4.14 5.4-spi
head:   f18d6b8720893df4172d217fd074ba23ac53a7a7
commit: eb31f9fb1fa2612c9024fcd18b95e511df50a1e5 [10/41] net: wireguard: update 
wireguard compat
:::::: branch date: 6 weeks ago
:::::: commit date: 5 months ago
config: x86_64-randconfig-m001-20210818 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>
Reported-by: Dan Carpenter <[email protected]>

smatch warnings:
net/wireguard/compat/compat.h:1061 ip_tunnel_parse_protocol() warn: ignoring 
unreachable code.

vim +1061 net/wireguard/compat/compat.h

eb31f9fb1fa261 Frank Wunderlich 2021-03-16  1054  
eb31f9fb1fa261 Frank Wunderlich 2021-03-16  1055  #if LINUX_VERSION_CODE < 
KERNEL_VERSION(5, 8, 0)
eb31f9fb1fa261 Frank Wunderlich 2021-03-16  1056  #include <linux/skbuff.h>
eb31f9fb1fa261 Frank Wunderlich 2021-03-16  1057  #include <linux/ip.h>
eb31f9fb1fa261 Frank Wunderlich 2021-03-16  1058  #include <linux/ipv6.h>
eb31f9fb1fa261 Frank Wunderlich 2021-03-16  1059  static inline __be16 
ip_tunnel_parse_protocol(const struct sk_buff *skb)
eb31f9fb1fa261 Frank Wunderlich 2021-03-16  1060  {
eb31f9fb1fa261 Frank Wunderlich 2021-03-16 @1061        if 
(skb_network_header(skb) >= skb->head &&
eb31f9fb1fa261 Frank Wunderlich 2021-03-16  1062            
(skb_network_header(skb) + sizeof(struct iphdr)) <= skb_tail_pointer(skb) &&
eb31f9fb1fa261 Frank Wunderlich 2021-03-16  1063            
ip_hdr(skb)->version == 4)
eb31f9fb1fa261 Frank Wunderlich 2021-03-16  1064                return 
htons(ETH_P_IP);
eb31f9fb1fa261 Frank Wunderlich 2021-03-16  1065        if 
(skb_network_header(skb) >= skb->head &&
eb31f9fb1fa261 Frank Wunderlich 2021-03-16  1066            
(skb_network_header(skb) + sizeof(struct ipv6hdr)) <= skb_tail_pointer(skb) &&
eb31f9fb1fa261 Frank Wunderlich 2021-03-16  1067            
ipv6_hdr(skb)->version == 6)
eb31f9fb1fa261 Frank Wunderlich 2021-03-16  1068                return 
htons(ETH_P_IPV6);
eb31f9fb1fa261 Frank Wunderlich 2021-03-16  1069        return 0;
eb31f9fb1fa261 Frank Wunderlich 2021-03-16  1070  }
eb31f9fb1fa261 Frank Wunderlich 2021-03-16  1071  #if LINUX_VERSION_CODE >= 
KERNEL_VERSION(5, 1, 0) || defined(ISRHEL8)
eb31f9fb1fa261 Frank Wunderlich 2021-03-16  1072  static const struct 
header_ops ip_tunnel_header_ops = { .parse_protocol = ip_tunnel_parse_protocol 
};
eb31f9fb1fa261 Frank Wunderlich 2021-03-16  1073  #else
eb31f9fb1fa261 Frank Wunderlich 2021-03-16  1074  #define header_ops 
hard_header_len
eb31f9fb1fa261 Frank Wunderlich 2021-03-16  1075  #define ip_tunnel_header_ops 
*(char *)0 - (char *)0
eb31f9fb1fa261 Frank Wunderlich 2021-03-16  1076  #endif
eb31f9fb1fa261 Frank Wunderlich 2021-03-16  1077  #endif
eb31f9fb1fa261 Frank Wunderlich 2021-03-16  1078  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]

Attachment: .config.gz
Description: application/gzip

_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to