[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240824074033.2134514-8-lihongbo22@huawei.com>
Date: Sat, 24 Aug 2024 15:40:32 +0800
From: Hongbo Li <lihongbo22@...wei.com>
To: <johannes@...solutions.net>, <davem@...emloft.net>, <edumazet@...gle.com>,
<kuba@...nel.org>, <pabeni@...hat.com>, <allison.henderson@...cle.com>,
<dsahern@...nel.org>, <pshelar@....org>
CC: <linux-wireless@...r.kernel.org>, <netdev@...r.kernel.org>,
<rds-devel@....oracle.com>, <dccp@...r.kernel.org>, <dev@...nvswitch.org>,
<linux-afs@...ts.infradead.org>, <lihongbo22@...wei.com>
Subject: [PATCH net-next 7/8] net/rxrpc: Use min() to simplify the code
Let's use min() to simplify the code and fix the
Coccinelle/coccicheck warning reported by minmax.cocci.
Signed-off-by: Hongbo Li <lihongbo22@...wei.com>
---
net/rxrpc/input.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/rxrpc/input.c b/net/rxrpc/input.c
index 16d49a861dbb..455aa0189b28 100644
--- a/net/rxrpc/input.c
+++ b/net/rxrpc/input.c
@@ -868,8 +868,7 @@ static void rxrpc_input_ack(struct rxrpc_call *call, struct sk_buff *skb)
prev_pkt = sp->ack.prev_ack;
nr_acks = sp->ack.nr_acks;
hard_ack = first_soft_ack - 1;
- summary.ack_reason = (sp->ack.reason < RXRPC_ACK__INVALID ?
- sp->ack.reason : RXRPC_ACK__INVALID);
+ summary.ack_reason = min(sp->ack.reason, RXRPC_ACK__INVALID);
trace_rxrpc_rx_ack(call, ack_serial, acked_serial,
first_soft_ack, prev_pkt,
--
2.34.1
Powered by blists - more mailing lists