mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 04:12:04 -04:00
tcp: Fix compiler error due to type confusion
tcp_tso_should_defer() used the min() macro on incompatible types (u64 vs long)
error: comparison of distinct pointer types
('typeof (srtt_in_ns >> 1) *' (aka 'unsigned long long *')
and 'typeof (1000000L) *' (aka 'long *'))
Fix this up by using min_t to ensure the comparison is performed as
unsigned 64-bit integers
Fixes: 8b7ac7af3a
Change-Id: Iccd7ae5bdcc3fd77fea126389761cc30c5558315
This commit is contained in:
parent
09ce0d8408
commit
612434f5cc
1 changed files with 1 additions and 1 deletions
|
|
@ -2025,7 +2025,7 @@ static bool tcp_tso_should_defer(struct sock *sk, struct sk_buff *skb,
|
|||
/* If next ACK is likely to come too late,
|
||||
* ie in more than min(1ms, half srtt), do not defer.
|
||||
*/
|
||||
threshold = min(srtt_in_ns >> 1, NSEC_PER_MSEC);
|
||||
threshold = min_t(u64, srtt_in_ns >> 1, NSEC_PER_MSEC);
|
||||
|
||||
if ((s64)(how_far_is_the_ack - threshold) > 0)
|
||||
goto send_now;
|
||||
|
|
|
|||
Loading…
Reference in a new issue