summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkernel test robot <lkp@intel.com>2021-03-27 10:29:32 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-07-07 17:35:11 +0200
commitc4829dc5ce1ce565db2e00bad89e327a73fe98fc (patch)
treea0b0763e1357a286da69d681e05b04e662957d8c
parentdd0d4f8cd8f3fa36e751faf3e02d90b73f588973 (diff)
downloadlinux-stable-c4829dc5ce1ce565db2e00bad89e327a73fe98fc.tar.gz
linux-stable-c4829dc5ce1ce565db2e00bad89e327a73fe98fc.tar.bz2
linux-stable-c4829dc5ce1ce565db2e00bad89e327a73fe98fc.zip
sit: use min
commit 284fda1eff8a8b27d2cafd7dc8fb423d13720f21 upstream. 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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-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 55c999cbe6e9..0b8a2ea0909f 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -316,7 +316,7 @@ static int ipip6_tunnel_get_prl(struct ip_tunnel *t,
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