summaryrefslogtreecommitdiffstats
path: root/net/ipv6/sit.c
diff options
context:
space:
mode:
authorkernel test robot <lkp@intel.com>2021-03-27 10:29:32 +0100
committerDavid S. Miller <davem@davemloft.net>2021-03-29 02:58:39 +0200
commit284fda1eff8a8b27d2cafd7dc8fb423d13720f21 (patch)
tree71b5f2b6069abecbaf72ec24548ab6de41579273 /net/ipv6/sit.c
parentNFC: digital: Correct function name in the kerneldoc comments (diff)
downloadlinux-284fda1eff8a8b27d2cafd7dc8fb423d13720f21.tar.xz
linux-284fda1eff8a8b27d2cafd7dc8fb423d13720f21.zip
sit: use min
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>
Diffstat (limited to 'net/ipv6/sit.c')
-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 63ccd9f2dccc..b9bd2723f89a 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -325,7 +325,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