Skip to contentSkip to conversation

NET: Remove unneeded implicit type case when calling tcp_minshall_update()

PATCH Applied Chuck Lever 2 participants 2 messages Oct 23, 2007 – Oct 24, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 5/5 NET: Remove unneeded implicit type case when calling tcp_minshall_update()

The tcp_minshall_update() function is called in exactly one place, and is passed an unsigned integer for the mss_len argument. Make the sign of the argument match the sign of the passed variable in order to eliminate an unneeded implicit type cast and a mixed sign comparison in tcp_minshall_update().

---

 include/net/tcp.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
include/net/tcp.h +1 -1
index 92049e6..d695cea 100644
@@ -803,7 +803,7 @@ static inline int tcp_is_cwnd_limited(const struct sock *sk, u32 in_flight)
 		return left <= tcp_max_burst(tp);
 }
 
-static inline void tcp_minshall_update(struct tcp_sock *tp, int mss,
+static inline void tcp_minshall_update(struct tcp_sock *tp, unsigned int mss,
 				       const struct sk_buff *skb)
 {
 	if (skb->len < mss)
maintainer Applied
#1 lore raw

From: Chuck Lever <[email protected]>
Date: Tue, 23 Oct 2007 11:44:33 -0400

Quoted 7 lines

The tcp_minshall_update() function is called in exactly one place, and is passed an unsigned integer for the mss_len argument. Make the sign of the argument match the sign of the passed variable in order to eliminate an unneeded implicit type cast and a mixed sign comparison in tcp_minshall_update().

Applied, thanks.

Quoted 1 line

Actually, you only CC:'d linux-kernel on these patches.