net: remove the check argument from __skb_gro_checksum_convert
authorLi RongQing <lirongqing@baidu.com>
Fri, 3 Jan 2020 03:51:00 +0000 (11:51 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 3 Jan 2020 20:24:34 +0000 (12:24 -0800)
The argument is always ignored, so remove it.

Signed-off-by: Li RongQing <lirongqing@baidu.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netdevice.h
net/ipv4/gre_offload.c
net/ipv4/udp_offload.c
net/ipv6/udp_offload.c

index 2fd19fb8826dd8f95d01e8afa7fa2f27337f7fc0..2741aa35bec6cc53441e4bf8ea2fa59606cda84a 100644 (file)
@@ -2826,16 +2826,16 @@ static inline bool __skb_gro_checksum_convert_check(struct sk_buff *skb)
 }
 
 static inline void __skb_gro_checksum_convert(struct sk_buff *skb,
-                                             __sum16 check, __wsum pseudo)
+                                             __wsum pseudo)
 {
        NAPI_GRO_CB(skb)->csum = ~pseudo;
        NAPI_GRO_CB(skb)->csum_valid = 1;
 }
 
-#define skb_gro_checksum_try_convert(skb, proto, check, compute_pseudo)        \
+#define skb_gro_checksum_try_convert(skb, proto, compute_pseudo)       \
 do {                                                                   \
        if (__skb_gro_checksum_convert_check(skb))                      \
-               __skb_gro_checksum_convert(skb, check,                  \
+               __skb_gro_checksum_convert(skb,                         \
                                           compute_pseudo(skb, proto)); \
 } while (0)
 
index 4de7e962d3da2b41c69be9fb300b53dccc1fb13d..2e6d1b7a7bc9a5c369c35e9be3a4ca40cee2e491 100644 (file)
@@ -174,7 +174,7 @@ static struct sk_buff *gre_gro_receive(struct list_head *head,
                if (skb_gro_checksum_simple_validate(skb))
                        goto out_unlock;
 
-               skb_gro_checksum_try_convert(skb, IPPROTO_GRE, 0,
+               skb_gro_checksum_try_convert(skb, IPPROTO_GRE,
                                             null_compute_pseudo);
        }
 
index a3908e55ed89aa519ab761f3e4690819efe7ff33..b25e42100ceb051264f42cf17bb74b820c7962aa 100644 (file)
@@ -480,7 +480,7 @@ struct sk_buff *udp4_gro_receive(struct list_head *head, struct sk_buff *skb)
                                                 inet_gro_compute_pseudo))
                goto flush;
        else if (uh->check)
-               skb_gro_checksum_try_convert(skb, IPPROTO_UDP, uh->check,
+               skb_gro_checksum_try_convert(skb, IPPROTO_UDP,
                                             inet_gro_compute_pseudo);
 skip:
        NAPI_GRO_CB(skb)->is_ipv6 = 0;
index 64b8f05d6735e01d99ce80b68baba77c2a41e066..f0d5fc27d0b562ac91138fa5ad7857313f29c008 100644 (file)
@@ -127,7 +127,7 @@ struct sk_buff *udp6_gro_receive(struct list_head *head, struct sk_buff *skb)
                                                 ip6_gro_compute_pseudo))
                goto flush;
        else if (uh->check)
-               skb_gro_checksum_try_convert(skb, IPPROTO_UDP, uh->check,
+               skb_gro_checksum_try_convert(skb, IPPROTO_UDP,
                                             ip6_gro_compute_pseudo);
 
 skip: