Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp5456264rwi; Sun, 23 Oct 2022 06:25:56 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4iKF3RhWBZVcti2hsd2ZosMNJTNs3zypw0EBZBtM8DC5+Ce3KhGwem4CGgSidmZoEgvvMN X-Received: by 2002:a17:907:608d:b0:7a2:b93e:a765 with SMTP id ht13-20020a170907608d00b007a2b93ea765mr4575961ejc.273.1666531556439; Sun, 23 Oct 2022 06:25:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666531556; cv=none; d=google.com; s=arc-20160816; b=aSl4NEua3vF3ncTrxm2rqvBFt1NC566ropNhjH2jmyFyqhTx4bgFmq67/nBlhEQ7qy 1JkARys0PR8Nja0iCg7gp9dQWzg6u+EtwkEmu61rORWZ6EUUic3Ni8hat3mJsiGB5xPz o91K8KhXG6cvdGuNtzVH29tR0LgAIO2vIVdeZY7QOd7Eqyl542NxeR9oRw9auzT43wQm 50xNXf3rm0VXENjf2QuPy3B7wRQCfxpvewxYq0+AS6Q0J6Z1DhevUxP6O56PFSVmYynv 2mepN/oRoqsRen14kDjZrCiTqMJt/2dOw4bfelwMhXIH8G9Ae1vq3egm0xHt88uzue31 niFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:mime-version :content-transfer-encoding:subject:cc:to:from:date; bh=Vcp3LyXzdHH3f5Wn0sRFmIvYD1C6p3Se6ZZuykTkzWA=; b=Ai7pcOk8I5tw+emkUIkkg5wMpOi1sBcQPbTGoSACZzgbIQ/zl+7dllLjmNbDDvcfxo jSSNXU8/I5M7TnZxrpxw/AO0QQcrbxDjEYVoMprWtVDFZG3tPEm+7PM6klU5Qtk03h6z Chk66XiyJq81SW4LXxDSwtUguu91vW47QG6e1Zxd7iz1nwtDuwq0D3x5JqXsBw65WhrY nEaN6sqlbh/9XV6Qi/uhxEOqDUvMkcswP7jLWghcaiLW3G1T4qmsXQmkUOzQWdMYIwBh uCedc501MhUncAAg5HC2jHM9/ROUwlXN/3qSNz7v1DhRS5f5TPmncC7t+vNN2S+DXqo1 qj8g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m2-20020a1709062ac200b0078da856a4ecsi19481424eje.391.2022.10.23.06.25.31; Sun, 23 Oct 2022 06:25:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230211AbiJWNLy (ORCPT + 99 others); Sun, 23 Oct 2022 09:11:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230199AbiJWNLt (ORCPT ); Sun, 23 Oct 2022 09:11:49 -0400 X-Greylist: delayed 216 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Sun, 23 Oct 2022 06:11:32 PDT Received: from jari.cn (unknown [218.92.28.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E4D08625D2; Sun, 23 Oct 2022 06:11:31 -0700 (PDT) Received: by ajax-webmail-localhost.localdomain (Coremail) ; Sun, 23 Oct 2022 21:07:00 +0800 (GMT+08:00) X-Originating-IP: [182.148.15.254] Date: Sun, 23 Oct 2022 21:07:00 +0800 (GMT+08:00) X-CM-HeaderCharset: UTF-8 From: "KaiLong Wang" To: davem@davemloft.net, yoshfuji@linux-ipv6.org, dsahern@kernel.org, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] net: replace ternary operator with min() X-Priority: 3 X-Mailer: Coremail Webmail Server Version XT6.0.1 build 20210329(c53f3fee) Copyright (c) 2002-2022 www.mailtech.cn mispb-4e503810-ca60-4ec8-a188-7102c18937cf-zhkzyfz.cn Content-Transfer-Encoding: base64 Content-Type: text/plain; charset=UTF-8 MIME-Version: 1.0 Message-ID: <4e5c1182.347.18404f42721.Coremail.wangkailong@jari.cn> X-Coremail-Locale: zh_CN X-CM-TRANSID: AQAAfwAXIW90PFVjtuVoAA--.1430W X-CM-SenderInfo: 5zdqwypdlo00nj6mt2flof0/1tbiAQAIB2FEYxtOnAACsD X-Coremail-Antispam: 1Ur529EdanIXcx71UUUUU7IcSsGvfJ3iIAIbVAYjsxI4VWxJw CS07vEb4IE77IF4wCS07vE1I0E4x80FVAKz4kxMIAIbVAFxVCaYxvI4VCIwcAKzIAtYxBI daVFxhVjvjDU= X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00,RCVD_IN_PBL,RDNS_NONE, T_SPF_HELO_PERMERROR,T_SPF_PERMERROR,XPRIO autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Rml4IHRoZSBmb2xsb3dpbmcgY29jY2ljaGVjayB3YXJuaW5nOgoKbmV0L2lwdjQvaWdtcC5jOjI2 MjE6IFdBUk5JTkcgb3Bwb3J0dW5pdHkgZm9yIG1pbigpCm5ldC9pcHY0L2lnbXAuYzoyNTc0OiBX QVJOSU5HIG9wcG9ydHVuaXR5IGZvciBtaW4oKQpuZXQvaXB2NC9pcF9zb2NrZ2x1ZS5jOjI4NTog V0FSTklORyBvcHBvcnR1bml0eSBmb3IgbWluKCkKClNpZ25l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