Skip to content

Commit

Permalink
sit: use min
Browse files Browse the repository at this point in the history
[ Upstream commit 284fda1 ]

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: Sasha Levin <sashal@kernel.org>
  • Loading branch information
intel-lab-lkp authored and gregkh committed Jul 7, 2022
1 parent 652fd40 commit 25055da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv6/sit.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,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
Expand Down

0 comments on commit 25055da

Please sign in to comment.