提交 3f9693a9 编写于 作者: K kernel test robot 提交者: Zheng Zengkai

sit: use min

stable inclusion
from stable-v5.10.129
commit 25055da22a0f8f8323a7486049c6cc7a17381f2d
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5YNDQ

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=25055da22a0f8f8323a7486049c6cc7a17381f2d

--------------------------------

[ Upstream commit 284fda1e ]

Opportunity for min()

Generated by: scripts/coccinelle/misc/minmax.cocci

CC: Denis Efremov <efremov@linux.com>
Reported-by: Nkernel test robot <lkp@intel.com>
Signed-off-by: Nkernel test robot <lkp@intel.com>
Reviewed-by: NDavid Ahern <dsahern@kernel.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Reviewed-by: NWei Li <liwei391@huawei.com>
上级 9a87ddcb
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册