From: kernel test robot Date: Sat, 27 Mar 2021 09:29:32 +0000 (+0100) Subject: sit: use min X-Git-Tag: v4.19.251~9 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c4829dc5ce1ce565db2e00bad89e327a73fe98fc;p=thirdparty%2Fkernel%2Fstable.git sit: use min commit 284fda1eff8a8b27d2cafd7dc8fb423d13720f21 upstream. Opportunity for min() Generated by: scripts/coccinelle/misc/minmax.cocci CC: Denis Efremov Reported-by: kernel test robot Signed-off-by: kernel test robot Reviewed-by: David Ahern Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index 55c999cbe6e96..0b8a2ea0909fd 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