summaryrefslogtreecommitdiff
path: root/net/ipv6
diff options
context:
space:
mode:
authorkernel test robot <lkp@intel.com>2021-03-27 12:29:32 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-07-07 18:52:20 +0300
commit25055da22a0f8f8323a7486049c6cc7a17381f2d (patch)
tree415630d156bb1985fd43bd6025f6bd11b0617ba2 /net/ipv6
parent652fd40eb01cc2c9348af293dbc7b1983a91e958 (diff)
downloadlinux-25055da22a0f8f8323a7486049c6cc7a17381f2d.tar.xz
sit: use min
[ Upstream commit 284fda1eff8a8b27d2cafd7dc8fb423d13720f21 ] Opportunity for min() Generated by: scripts/coccinelle/misc/minmax.cocci CC: Denis Efremov <efremov@linux.com> Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: kernel test robot <lkp@intel.com> Reviewed-by: David Ahern <dsahern@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/sit.c2
1 files changed, 1 insertions, 1 deletions
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