From patchwork Sat Mar 27 09:29:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 12168251 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D1A42C433C1 for ; Sat, 27 Mar 2021 09:30:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A2595619F8 for ; Sat, 27 Mar 2021 09:30:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231254AbhC0J3z (ORCPT ); Sat, 27 Mar 2021 05:29:55 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:51085 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230329AbhC0J3f (ORCPT ); Sat, 27 Mar 2021 05:29:35 -0400 IronPort-HdrOrdr: A9a23:v8i5YaMpIEj9fcBcTgGjsMiAIKoaSvp033AA0UdtRRtJNvGJjszGpoV46TbYgCscMUtKpfmuI6+FKEm3ybdQwa08eYivRxPnvmzAFvAA0aLHzyf7EyPzss5xvJ0AT4FEBNf9DUd3gK/BiWGFOuw9y9qK+r3Av4nj5kpqJDsHV4hd9QtjTi6UHkpqLTMnObMJUKvZ3MZBqja6EE57Uu2wDBA+MNT+mw== X-IronPort-AV: E=Sophos;i="5.81,283,1610406000"; d="scan'208";a="377023408" Received: from 173.121.68.85.rev.sfr.net (HELO hadrien) ([85.68.121.173]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Mar 2021 10:29:32 +0100 Date: Sat, 27 Mar 2021 10:29:32 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: Hideaki YOSHIFUJI , David Ahern , Jakub Kicinski cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Denis Efremov , kbuild-all@lists.01.org Subject: [PATCH] sit: use min Message-ID: User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: kernel test robot 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 --- 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