From mboxrd@z Thu Jan 1 00:00:00 1970 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 5A89FCA0EEB for ; Mon, 18 Aug 2025 13:43:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:CC:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=nPrQ8oRL9VBtBCzvrWIM0grMCVozApgoCHnqpYoDtao=; b=MYxiiFBvMv9P1a WziuZvpN59ghm/t/sG4Cdr/uZsuxcgTV22zAgd2LdixgVEkLcVJFtyo+lK7iCdkEIECOZPYQ6CjmW rw9SJ0RcQ6OyY76zCxrRnmuINanc4ymc8rWVsx1s6FEqwADFSgT47fxkee2joVnpNaKwejIWC7Ven wpncQP3aJx/FNvHLAWVRYfp+5dWyNPeBzN7tWdh8ZVxEnn+jMrDjJ5SHBTqsz51pbsI53vr713OMh hH592PaKMuw/2OZb3Kuo/mBVce5r3abiLbt7O+H4wURmQzWMiA5LuA/Eowuh5p8/LbOR/m1Qq7lTG A3EITY5MBSsDyCxxv/2A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uo08V-00000007cpd-0q62; Mon, 18 Aug 2025 13:42:55 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93] helo=mx07-00178001.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1unylJ-00000007JDO-19f7; Mon, 18 Aug 2025 12:14:54 +0000 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 57IBFYxq016305; Mon, 18 Aug 2025 14:14:22 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=selector1; bh= Di2sJMGDTfc2gFtc34a6qY4519gtg5sAUPBz5vhubF0=; b=1hz90Qtb072d/lZA y9NnyHsNccVQIbaFxcx7E7yMN9BVd6YWYCKylGEN0e+OTGXy865/O0Gbf3dEl9Z1 +pyjnZtqZmY2hzn9RxRMNrPWlLtWLnBzv9SpI7iBuZ/YBnTIyzd+BxQeYYhkAnBf lX0UbccWrDFNhEjef3I/A05Gy8if96eAhsYMdQYBIYX+g0MMFq0OgbfziCesFdFl nXQ1MgcAlJriBhvCSa3kyLIDJFZiBSDm3BbHyZUB9/jrK0ro6YbspzGy9IWCI7bL FHgHd+KEt/UAXCrUnRbJH4HCqt+6p5voVSZk9OWqBUOTtwg3MAsd6wUIGVvnupeu MGwV9Q== Received: from beta.dmz-ap.st.com (beta.dmz-ap.st.com [138.198.100.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 48jf47p5mr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 18 Aug 2025 14:14:22 +0200 (MEST) Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 2B43640058; Mon, 18 Aug 2025 14:11:18 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 5BF7971CEFF; Mon, 18 Aug 2025 14:09:58 +0200 (CEST) Received: from [10.48.87.121] (10.48.87.121) by SHFDAG1NODE1.st.com (10.75.129.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 18 Aug 2025 14:09:53 +0200 Message-ID: <836b8be6-ec6a-413d-8657-ee02025ebc24@foss.st.com> Date: Mon, 18 Aug 2025 14:09:52 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 059/114] clk: stm32: stm32mp1: convert from round_rate() to determine_rate() To: , Michael Turquette , "Stephen Boyd" , Sudeep Holla , "Cristian Marussi" , Chen Wang , Inochi Amaoto , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Paul Cercueil , Keguang Zhang , Taichi Sugaya , "Takao Orito" , Shawn Guo , "Sascha Hauer" , Pengutronix Kernel Team , Fabio Estevam , Jacky Huang , Shan-Chun Hung , "Vladimir Zapolskiy" , Piotr Wojtaszczyk , Paul Walmsley , Samuel Holland , Yixun Lan , Steen Hegelund , Daniel Machon , , Orson Zhai , Baolin Wang , Chunyan Zhang , "Maxime Coquelin" , Alexandre Torgue , Michal Simek , "Maxime Ripard" , =?UTF-8?Q?Andreas_F=C3=A4rber?= , Manivannan Sadhasivam , Sven Peter , Janne Grunau , Alyssa Rosenzweig , Neal Gompa , Eugeniy Paltsev , Ray Jui , Scott Branden , Broadcom internal kernel review list , Max Filippov , Matthias Brugger , AngeloGioacchino Del Regno , Daniel Palmer , Romain Perier , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Bjorn Andersson , Geert Uytterhoeven , Heiko Stuebner , Andrea della Porta , "Krzysztof Kozlowski" , Sylwester Nawrocki , Chanwoo Choi , Alim Akhtar , Qin Jian , Viresh Kumar , "Ulf Hansson" , Luca Ceresoli , Alex Helms , Linus Walleij , Liviu Dudau , "Lorenzo Pieralisi" , Nobuhiro Iwamatsu CC: , , , , , , , , , , , , , , , , , , References: <20250811-clk-for-stephen-round-rate-v1-0-b3bf97b038dc@redhat.com> <20250811-clk-for-stephen-round-rate-v1-59-b3bf97b038dc@redhat.com> Content-Language: en-US From: Gabriel FERNANDEZ In-Reply-To: <20250811-clk-for-stephen-round-rate-v1-59-b3bf97b038dc@redhat.com> X-Originating-IP: [10.48.87.121] X-ClientProxiedBy: EQNCAS1NODE3.st.com (10.75.129.80) To SHFDAG1NODE1.st.com (10.75.129.69) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-08-18_05,2025-08-14_01,2025-03-28_01 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250818_051453_587938_B6DEDC3A X-CRM114-Status: GOOD ( 16.72 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On 8/11/25 17:18, Brian Masney via B4 Relay wrote: > From: Brian Masney > > The round_rate() clk ops is deprecated, so migrate this driver from > round_rate() to determine_rate() using the Coccinelle semantic patch > on the cover letter of this series. > > Signed-off-by: Brian Masney Reviewed-by: Gabriel Fernandez > --- > drivers/clk/stm32/clk-stm32mp1.c | 13 ++++++++----- > 1 file changed, 8 insertions(+), 5 deletions(-) > > diff --git a/drivers/clk/stm32/clk-stm32mp1.c b/drivers/clk/stm32/clk-stm32mp1.c > index b8b45ed22f981df580506f3d4ca801ba11d2bab2..2d9ccd96ec98c05eb836d632bfd9903de60ba1bb 100644 > --- a/drivers/clk/stm32/clk-stm32mp1.c > +++ b/drivers/clk/stm32/clk-stm32mp1.c > @@ -970,12 +970,15 @@ static unsigned long __bestmult(struct clk_hw *hw, unsigned long rate, > return mult; > } > > -static long timer_ker_round_rate(struct clk_hw *hw, unsigned long rate, > - unsigned long *parent_rate) > +static int timer_ker_determine_rate(struct clk_hw *hw, > + struct clk_rate_request *req) > { > - unsigned long factor = __bestmult(hw, rate, *parent_rate); > + unsigned long factor = __bestmult(hw, req->rate, > + req->best_parent_rate); > > - return *parent_rate * factor; > + req->rate = req->best_parent_rate * factor; > + > + return 0; > } > > static int timer_ker_set_rate(struct clk_hw *hw, unsigned long rate, > @@ -1026,7 +1029,7 @@ static unsigned long timer_ker_recalc_rate(struct clk_hw *hw, > > static const struct clk_ops timer_ker_ops = { > .recalc_rate = timer_ker_recalc_rate, > - .round_rate = timer_ker_round_rate, > + .determine_rate = timer_ker_determine_rate, > .set_rate = timer_ker_set_rate, > > }; > _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv