From: David Howells Date: Fri, 23 Sep 2016 13:04:38 +0000 (+0100) Subject: rxrpc: Use before_eq() and friends to compare serial numbers X-Git-Tag: v4.9-rc1~127^2~76^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=98dafac5697fbe1fb4bef9e3204baf9051641b00;p=platform%2Fkernel%2Flinux-exynos.git rxrpc: Use before_eq() and friends to compare serial numbers before_eq() and friends should be used to compare serial numbers (when not checking for (non)equality) rather than casting to int, subtracting and checking the result. Signed-off-by: David Howells --- diff --git a/net/rxrpc/input.c b/net/rxrpc/input.c index cbb5d53..06027b6 100644 --- a/net/rxrpc/input.c +++ b/net/rxrpc/input.c @@ -578,7 +578,7 @@ static void rxrpc_input_ack(struct rxrpc_call *call, struct sk_buff *skb, } /* Discard any out-of-order or duplicate ACKs. */ - if ((int)sp->hdr.serial - (int)call->acks_latest <= 0) { + if (before_eq(sp->hdr.serial, call->acks_latest)) { _debug("discard ACK %d <= %d", sp->hdr.serial, call->acks_latest); return;