From patchwork Thu Aug 22 07:45:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Ruibin <11162571@vivo.com> X-Patchwork-Id: 13772902 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 63C19C531DF for ; Thu, 22 Aug 2024 07:47:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:Message-Id:Date:Subject:Cc:To:From:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=OmiKKt8tHHGJlM4tjABkx9wxhxJ/65PnMgNFmmYhqkI=; b=Hb6alAQf61ZPPLXTHwAaFa8BpU LnLUgU97FnKWQ2jPdJwGe08YJP7J47SIQmw9h4/uHe1HPyPwlu+G9Ms4PTI6pUdhEW+5NCSamlDFc 4znuBJMAjJz8wpNndkLi6hOxgwL2KIrDyHhVG6eYHgLd3vtmpYiSlZbNEWeDiOe73Xa4FWqeK/18E NXhxSB2QDezYmjLHXhNk0zBoOSw9SJalSA9ECXxxx0T20cHvES0yB3/fPrKJrnp1ZjpcsOnPTUUuD +KT9yI4vp9aldJ++SAq+MbM64rMaNdICBhyx0P+4G/sbVVh96j8EH26ZeOc27czmGUZFiqQmj4O1d 3P4tiNqA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh2X2-0000000BvZ8-2ysI; Thu, 22 Aug 2024 07:46:56 +0000 Received: from mail-psaapc01on2062b.outbound.protection.outlook.com ([2a01:111:f400:feae::62b] helo=APC01-PSA-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh2WH-0000000BvOh-36bD for linux-arm-kernel@lists.infradead.org; Thu, 22 Aug 2024 07:46:12 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=pESfIyur8iPLV5w3VeKw2x1tLTx1VrzNpBKvNDYkG9tn8K9u+KJ/2+3Bt4OytgGYRUsDOLdDhfu1mC2mrUBuHZKRrDPGSKInU6kRn+XdwaZ3w4F48eI39VqhUBwlwTjlVKSAq5jQolk0QnN0FOhcTutkmI74rFltF3tdQ14YS6e8WlXRNfsgvI+KJ62FnXT702HZrf8BLgClDk8NZLV5i5KWCX4qlY4L49aA1XJcxS8jUKicQn0ZtUF20oVevIOeAhXRT0JFOPKpXD9ShVPHs/Xy8FxAXX9+d7OvHkR3rcjfUtj8v6PYdcGMn+WelIv+5V8J1LxyWzkqOyVQ3MWLBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=OmiKKt8tHHGJlM4tjABkx9wxhxJ/65PnMgNFmmYhqkI=; b=NsW5v82FmhZDcjAEBQX15y2nxk2fZPglg4ojIzI8F5RH8803pd8KQ1Swafn0NlupdwcnmT1MK09/BtJJT2NL4O8GCKTYJoVIRnl1VgRfAbZmG59PZyHuc5quTLp40QJz51rFbknVdc05AA1w9kWsdPvK6sPXAgdbPIEEVbMyS/ZWJTl4XA93umST4OyEmqMtIwzXQWhaoJcReglW37OdJC1h6pRVmHDSR6/+PoQa4HGdAi211FFu022amrYbOIfWQ+2SOZEPpboM2rfetzu0XyJuuHfd0qT5bkmwp6yd9tTqoORq7Ykhd50br7TTsDvja0NXh6dxjD5p7iKoLfGLBA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OmiKKt8tHHGJlM4tjABkx9wxhxJ/65PnMgNFmmYhqkI=; b=dPdyGXr/WzxBfQsROMDtZJ+Fb1i4HRntmgNTxO8m18ZJLhh0iQ8f3SvKFhZdgp/gOBaNIx2NG31pN0E/yMxxNxGscnfIXVZGGbT87ViGdeUTc2a0kqqZNX5X8eW7e4Gh9D3m01o+GnsaUuaQmWrujOMxYix61u/Y21QaxiGCOHhuiRAeMg3EHo0XdaPso58B+pYnzJMzdU77HMRNUckngLdooX8kPh/aPa1GzwPMZYRL4RBrmBQEt+M9Bl7+KCZJooChynlHDYYHnYNxTo5Lo4mjIw3OAa33Y3WUikjei9IB+dpo7QhmZSLUcRZmiVNFk2S/FL5PsiP/n8faihvMQA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from TYZPR06MB6263.apcprd06.prod.outlook.com (2603:1096:400:33d::14) by TY0PR06MB5777.apcprd06.prod.outlook.com (2603:1096:400:270::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.18; Thu, 22 Aug 2024 07:45:58 +0000 Received: from TYZPR06MB6263.apcprd06.prod.outlook.com ([fe80::bd8:d8ed:8dd5:3268]) by TYZPR06MB6263.apcprd06.prod.outlook.com ([fe80::bd8:d8ed:8dd5:3268%6]) with mapi id 15.20.7875.019; Thu, 22 Aug 2024 07:45:58 +0000 From: Yang Ruibin <11162571@vivo.com> To: Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , "Rafael J. Wysocki" , Viresh Kumar , linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: opensource.kernel@vivo.com, Yang Ruibin <11162571@vivo.com> Subject: [PATCH v1] drivers:cpufreq:Use max macro Date: Thu, 22 Aug 2024 15:45:48 +0800 Message-Id: <20240822074548.1365390-1-11162571@vivo.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: TYCP286CA0163.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:383::10) To TYZPR06MB6263.apcprd06.prod.outlook.com (2603:1096:400:33d::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR06MB6263:EE_|TY0PR06MB5777:EE_ X-MS-Office365-Filtering-Correlation-Id: c1a56a65-1c97-45be-9c76-08dcc27e75d5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|52116014|376014|38350700014|81742002; X-Microsoft-Antispam-Message-Info: 043rtx/v2KlnfYu2KNbl/YI+Z3pyLonQ8q5sSSVwcGmaYfMxi4fFEbsofdiFa8oxcJC/th+847GNcNjPWZCzDY/Dpa3f9J0VynmTKC8SH59SddGkAl30M4Y6/xHwkZCYNUfMgEePVI08SpWPAOMpQqaiBQCOtGhlFiXGTkxG5hkUVXamLHwPuPHlwAHgYmUFTphTCAqCAQmtEcUPK6KJvv/VBwevqO1PERHvExMnKLS6KqJRpFPMNaRxchN+e1fw/POyC9MNC5sXXslC9GlZKSHXowiRAo+XzdrclhhB1d7cZEPEDuf5NRO9ou6vyIfEykbptmrMfytBDvEx9v7kJcNt/zC4ruMDz9MS0zNO6yHAJdqiNpMwsJUciuoJ7bzrHc4kwqLOxTbbfI157ZZZvRtppZUtxgvBD/BvGMzi7ZMXKhjKP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V:NSPM;H:TYZPR06MB6263.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(52116014)(376014)(38350700014)(81742002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: +SqMtAn0EapD8+zrAuDG7OrwynDsyT6ZwIJy8ln8xXVj8CxZrwZrxWyzsu0YDjMEsS2cn+hAbESpQODK+TNfAkDFhULLZH+7Gmrx18vajvzzldActj4euKUDfSEdtAniUPpDlv+FFzG1wVVW7f6ioE4weFVdw1iYYxCybtqiUP513PWHt3V7T6mDvXQqbOvKmCnTdnnXk5y2rJH57139Qie4uAHU6XXSlRd9Cy3UGcVdb6z9BfFHy7J4fcsutiHOUazWUnCC5iEEYp8d/rD/GVXdXTon7WneH82qhXbeVQlho7FLkMr1lutMtKeU7zOwwN/erTo6JrMbREsJatgDbVV0AImvfIrUsDBmS6KUMpwwtj+9EScHZU+3Sup+n07rPHaVHnTC+hj2wKBDn9jJR6R2/j3n1SOZDjNSfEX4UKwaq4vKUkzNYahcX886uC0VFee7VndJxxbE74+5gU6TxFhnOGVVIy2cJ/Vur22uzBR2LaaQZ9F6MptaNOhhDavyRmzQNN0yO/4QrYJurxMFvRUasDvgrR9FhB07C+sXmHvlbwfJrCej8wCALnZk5yY8boy/bm8lPK9hcT9Vi096LpxeHMgfNXWJevNeHKi0FEieZyfxiwylWqv0dFpbx8ABRdarC09K5onFWGwsIky4R9Eo908csHqtl/ppq8sDRldKy6lRApPrz6G973yJYYR3Q2pgN9KXyaWfMqKJKvmbE5AFJGIvImKoVNiPguUH9muH5qACgNNY1heWApW56bJF9PTAyifTS9JuUyq1ouzf6yROmBQjSt5GonT1xGQaiSg/E7pOwRo1xOIMbKm7P8pyIlj6o6fbyiKOZ1vk/Z6q9iijJvr0FGz+jbxpNyvcX4N9JVo/7Xt52j7cAfURmFtb95H7B+hw9C3Z4gEHp7M5BMPBsN/qJvim+QxGAzVVAVsK5Ww8CUtQ+OpjUnOqYeNtIC+aIXMEGjmuK3N8O1+QiJewG8NbSSZtw01M3MEn+M+aHZ7uYbV+EOkwpZmcDb42XsWKwXU33GwxJaR6nQg3Y492jsx4TgV4N1BW5mODgxmj0/8oZ5Dw2cHXVKe1jeOHHdt5OHN2yknjCackxbTKwJ6GzMKsl5Wo+1Mz7Cjkjr64bzYs2HRn7l4gXzWAfwCVgqIQd1if4A46mr1LQG7O5sGC/dveNZenuddAUzh1egAFtjIGSxB05l7ClLYwP/LaIL5wzbcFPSC+jqCeaGRY89/MB8UnpupnoZf5aLfdBS3/hsBCVlI78dBYkmk80zGaFvj6yuEPID/aNWq9S9IVVdBX5bmBAttvIH4jsviu90QZXb5nRkZ0dIToQiQ5OCzCZV7LG/tFbK146EanRp8i8Rq2ePpGk7QU8sKFawMA+0iLv1KApC68H9K9HtfSJWgerT8rJGOcc4u38n8OEUkpBqdoAlOtyBLaotAEBgGFTfq3gGeiInbA03HTSAKa7DXT9jxp3zur69wl0WuNBg0QYh7yL1IkEmeHN6UI0/u2zTCiyoC8x5rRpzT/TVpGij2CzSNdOsGPWttnpIgzQ7m2cG99gusRIsO4Wj2Y/RrNWBOK8BY9J+Gcgi6ZAULUbD+G X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: c1a56a65-1c97-45be-9c76-08dcc27e75d5 X-MS-Exchange-CrossTenant-AuthSource: TYZPR06MB6263.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Aug 2024 07:45:58.0760 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: vwaMeR0RXT26iH23zsYwSbBYY65vji92Qi9a/qNDSWwhDava3VGfte2+IfkwIVUxz24K24q62r9e+xCcYIS+vg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR06MB5777 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240822_004609_804127_C028C338 X-CRM114-Status: GOOD ( 10.77 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Instead of using the max() implementation of the ternary operator, use real macros. Signed-off-by: Yang Ruibin <11162571@vivo.com> --- drivers/cpufreq/armada-37xx-cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/armada-37xx-cpufreq.c b/drivers/cpufreq/armada-37xx-cpufreq.c index bea41ccab..f4aa3e84d 100644 --- a/drivers/cpufreq/armada-37xx-cpufreq.c +++ b/drivers/cpufreq/armada-37xx-cpufreq.c @@ -269,7 +269,7 @@ static void __init armada37xx_cpufreq_avs_configure(struct regmap *base, */ target_vm = avs_map[l0_vdd_min] - 100; - target_vm = target_vm > MIN_VOLT_MV ? target_vm : MIN_VOLT_MV; + target_vm = max(target_vm, MIN_VOLT_MV); dvfs->avs[1] = armada_37xx_avs_val_match(target_vm); /*