[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1461617473-11349-1-git-send-email-soheil.kdev@gmail.com>
Date: Mon, 25 Apr 2016 16:51:12 -0400
From: Soheil Hassas Yeganeh <soheil.kdev@...il.com>
To: davem@...emloft.net, netdev@...r.kernel.org
Cc: kafai@...com, willemb@...gle.com, edumazet@...gle.com,
ycheng@...gle.com, ncardwell@...gle.com,
Soheil Hassas Yeganeh <soheil@...gle.com>
Subject: [PATCH net-next 1/2] tcp: remove an unnecessary check in tcp_tx_timestamp
From: Soheil Hassas Yeganeh <soheil@...gle.com>
tcp_tx_timestamp() receives tsflags as a parameter. tsflags
is initialized to sk->sk_tsflags and is overridden by control
messages. As a result the "sk->sk_tsflags || tsflags" is the
same expression as "tsflags"
Remove the redundant check for sk->sk_tsflags in tcp_tx_timestamp.
Signed-off-by: Soheil Hassas Yeganeh <soheil@...gle.com>
---
net/ipv4/tcp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 4d73858..3c542dc 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);
--
2.8.0.rc3.226.g39d4020
Powered by blists - more mailing lists