From: Soheil Hassas Yeganeh Date: Thu, 28 Apr 2016 03:39:00 +0000 (-0400) Subject: tcp: remove an unnecessary check in tcp_tx_timestamp X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=863c1fd9814618eefba02218f8fadf8a430c2a17;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git tcp: remove an unnecessary check in tcp_tx_timestamp Remove the redundant check for sk->sk_tsflags in tcp_tx_timestamp. tcp_tx_timestamp() receives the tsflags as a parameter. As a result the "sk->sk_tsflags || tsflags" is redundant, since tsflags already includes sk->sk_tsflags plus overrides from control messages. Signed-off-by: Soheil Hassas Yeganeh Acked-by: Eric Dumazet Signed-off-by: David S. Miller --- diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 040f35e7efe0..53890a730ff4 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -430,7 +430,7 @@ EXPORT_SYMBOL(tcp_init_sock); static void tcp_tx_timestamp(struct sock *sk, u16 tsflags, struct sk_buff *skb) { - if (sk->sk_tsflags || tsflags) { + if (tsflags) { struct skb_shared_info *shinfo = skb_shinfo(skb); struct tcp_skb_cb *tcb = TCP_SKB_CB(skb);