diff options
author | kernel test robot <lkp@intel.com> | 2021-03-27 10:29:32 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-07-07 17:31:17 +0200 |
commit | de67923fb50bb57f7335665005f38b0a68d74f32 (patch) | |
tree | c5a0a0be231b15e724594671c26fcd43ddecad36 | |
parent | 5745aa0df47cfc68bdd55ecbfc7ae94ebfc32133 (diff) |
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index 43fd9cfa7b11..0dc98eef93a1 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 |