From: kernel test robot Date: Sat, 27 Mar 2021 09:29:32 +0000 (+0100) Subject: sit: use min X-Git-Tag: v4.14.287~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=de67923fb50bb57f7335665005f38b0a68d74f32;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 43fd9cfa7b115..0dc98eef93a16 100644 --- a/net/ipv6/sit.c +++ b/net/ipv6/sit.c @@ -310,7 +310,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