Received: by 2002:a05:6358:795:b0:dc:4c66:fc3e with SMTP id n21csp676031rwj; Sat, 29 Oct 2022 09:04:33 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4hEuo6rmYQ5qXw6k3lYETg+bZWGWBMeOuORZtkH6p3Jsoa2uGFZDeDp+rARGCIzUYVMrtd X-Received: by 2002:aa7:dbd2:0:b0:45c:97bb:4ae0 with SMTP id v18-20020aa7dbd2000000b0045c97bb4ae0mr4798460edt.417.1667059473393; Sat, 29 Oct 2022 09:04:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667059473; cv=none; d=google.com; s=arc-20160816; b=wv+0LdAPS1arHG6aDykeJB4dlqcdf5LJ3GDTgq+MmX2EoSqoTnfwjNOMw6tyI1fXah MyTEOiI2DqNFMcpxsWo+3/QF6+4GdfAewZC68r8IKwP23OV3DbtApaz33dr3kuPXCKdr HEicgclNWJMXZQpwsPXTJ8zx6SLZn1C8mPmtAwAlwlXOO19EBxWoIvlzHrOzV0CEFHu5 aufpUCsCv0Ze3wC8tR9PI40EaymKl08n+HN/+KhDOCxHwaY9tIWK6nc1+auVhqk9LriD M5xmNozc3GvsKpOoGMmTfTOKxGAKkhd2ahnyi3lIsrW1wTlPTHACPTWcqZoPYoUCwXPD 9hWA== 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=AwlfnhoFWwsvxeTOAhCTm+/X18QexKGue3skZwLKPN8=; b=tzX8/r9V0AosXmhLDyL3Fz7spBFH/poF8fNQUg+Q44mCOYqpGveVRQt1hKNDUc9WuG PVKdxfnijRO4CuXA8130fL3cCuktCkDv+3mKMR6Uqroy160K6OlHgmdurfo2Z3Bmcw0Y tc0pCOBJYfJ3qXodRxN93WPspQRPeNEUHNkasUu4QM1X/cXKIyfOn2Q1vqvM98CE2uOf 1Tbw7477ral61QrDiLZUpE5Ax7lypWNXJ3xsTABq6OOo/KyMxwQMCtl6wTJ4VC0yMCng 7o4VnaVCXf7ze8JMy5VVigYxydW/JsVXBk+RJREgZfGqeDQZTJjCVwDP1Dh10bmYnIPg CUkQ== 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 fk27-20020a056402399b00b00458cba4c78bsi1915148edb.416.2022.10.29.09.04.08; Sat, 29 Oct 2022 09:04:33 -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 S229678AbiJ2PYI (ORCPT + 99 others); Sat, 29 Oct 2022 11:24:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229904AbiJ2PYH (ORCPT ); Sat, 29 Oct 2022 11:24:07 -0400 Received: from jari.cn (unknown [218.92.28.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id ACC7D52087 for ; Sat, 29 Oct 2022 08:24:04 -0700 (PDT) Received: by ajax-webmail-localhost.localdomain (Coremail) ; Sat, 29 Oct 2022 23:19:27 +0800 (GMT+08:00) X-Originating-IP: [182.148.13.81] Date: Sat, 29 Oct 2022 23:19:27 +0800 (GMT+08:00) X-CM-HeaderCharset: UTF-8 From: wangkailong@jari.cn To: harry.wentland@amd.com, sunpeng.li@amd.com, airlied@gmail.com, daniel@ffwll.ch, HaoPing.Liu@amd.com, nicholas.kazlauskas@amd.com Cc: mario.limonciello@amd.com, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/amd/display: replace ternary operator with max() 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: <9d641b0.3d.184245391ec.Coremail.wangkailong@jari.cn> X-Coremail-Locale: zh_CN X-CM-TRANSID: AQAAfwCXq+F_RF1jA+AAAA--.19W X-CM-SenderInfo: 5zdqwypdlo00nj6mt2flof0/1tbiAQAKB2FEYx0AVwALsL 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 Rml4IHRoZSBmb2xsb3dpbmcgY29jY2ljaGVjayB3YXJuaW5nOgoKZGNuMjBfY2xrX21nci5jOjMx NDpXQVJOSU5HIG9wcG9ydHVuaXR5IGZvciBtYXgoKQpkY24yMF9jbGtfbWdyLmM6MzUxOldBUk5J Tkcgb3Bwb3J0dW5pdHkgZm9yIG1heCgpCgpTaWduZWQtb2ZmLWJ5OiBLYWlMb25nIFdhbmcgPHdh bmdrYWlsb25nQGphcmkuY24+Ci0tLQogZHJpdmVycy9ncHUvZHJt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