public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sit: use min
@ 2021-03-27  9:29 Julia Lawall
  2021-03-27 19:14 ` David Ahern
  0 siblings, 1 reply; 2+ messages in thread
From: Julia Lawall @ 2021-03-27  9:29 UTC (permalink / raw)
  To: Hideaki YOSHIFUJI, David Ahern, Jakub Kicinski
  Cc: netdev, linux-kernel, Denis Efremov, kbuild-all

From: kernel test robot <lkp@intel.com>

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>
---

 sit.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -325,7 +325,7 @@ static int ipip6_tunnel_get_prl(struct n

 	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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-27 19:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-27  9:29 [PATCH] sit: use min Julia Lawall
2021-03-27 19:14 ` David Ahern

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox