[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220705115616.987225723@linuxfoundation.org>
Date: Tue, 5 Jul 2022 13:58:20 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Denis Efremov <efremov@...ux.com>,
kernel test robot <lkp@...el.com>,
David Ahern <dsahern@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Sasha Levin <sashal@...nel.org>
Subject: [PATCH 5.10 57/84] sit: use min
From: kernel test robot <lkp@...el.com>
[ Upstream commit 284fda1eff8a8b27d2cafd7dc8fb423d13720f21 ]
Opportunity for min()
Generated by: scripts/coccinelle/misc/minmax.cocci
CC: Denis Efremov <efremov@...ux.com>
Reported-by: kernel test robot <lkp@...el.com>
Signed-off-by: kernel test robot <lkp@...el.com>
Reviewed-by: David Ahern <dsahern@...nel.org>
Signed-off-by: David S. Miller <davem@...emloft.net>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
net/ipv6/sit.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index bab0e99f6e35..0be82586ce32 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -323,7 +323,7 @@ static int ipip6_tunnel_get_prl(struct net_device *dev, struct ifreq *ifr)
rcu_read_lock();
- ca = t->prl_count < cmax ? t->prl_count : cmax;
+ ca = min(t->prl_count, cmax);
if (!kp) {
/* We don't try hard to allocate much memory for
--
2.35.1
Powered by blists - more mailing lists