lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f19aa842d210bf4cd3d7abf03ea7323f9e52df75.camel@crapouillou.net>
Date: Wed, 03 Sep 2025 21:20:32 +0200
From: Paul Cercueil <paul@...pouillou.net>
To: bmasney@...hat.com, Michael Turquette <mturquette@...libre.com>, Stephen
 Boyd <sboyd@...nel.org>
Cc: linux-clk@...r.kernel.org, linux-kernel@...r.kernel.org, 
	arm-scmi@...r.kernel.org, linux-arm-kernel@...ts.infradead.org, 
	sophgo@...ts.linux.dev, linux-mips@...r.kernel.org, imx@...ts.linux.dev, 
	linux-riscv@...ts.infradead.org, spacemit@...ts.linux.dev, 
	linux-stm32@...md-mailman.stormreply.com, patches@...nsource.cirrus.com, 
	linux-actions@...ts.infradead.org, asahi@...ts.linux.dev, 
	linux-mediatek@...ts.infradead.org, linux-arm-msm@...r.kernel.org, 
	linux-renesas-soc@...r.kernel.org, linux-rockchip@...ts.infradead.org, 
	linux-samsung-soc@...r.kernel.org, soc@...ts.linux.dev
Subject: Re: [PATCH 024/114] clk: ingenic: x1000-cgu: convert from
 round_rate() to determine_rate()

Le lundi 11 août 2025 à 11:18 -0400, Brian Masney via B4 Relay a
écrit :
> From: Brian Masney <bmasney@...hat.com>
> 
> 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 <bmasney@...hat.com>

Reviewed-by: Paul Cercueil <paul@...pouillou.net>

Cheers,
-Paul

> ---
>  drivers/clk/ingenic/x1000-cgu.c | 19 ++++++++++---------
>  1 file changed, 10 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/clk/ingenic/x1000-cgu.c
> b/drivers/clk/ingenic/x1000-cgu.c
> index
> feb03eed4fe8c8f617ef98254a522d72d452ac17..d80886caf393309a0c908c06fb5
> aa8b59aced127 100644
> --- a/drivers/clk/ingenic/x1000-cgu.c
> +++ b/drivers/clk/ingenic/x1000-cgu.c
> @@ -84,16 +84,17 @@ static unsigned long
> x1000_otg_phy_recalc_rate(struct clk_hw *hw,
>  	return parent_rate;
>  }
>  
> -static long x1000_otg_phy_round_rate(struct clk_hw *hw, unsigned
> long req_rate,
> -				      unsigned long *parent_rate)
> +static int x1000_otg_phy_determine_rate(struct clk_hw *hw,
> +					struct clk_rate_request
> *req)
>  {
> -	if (req_rate < 18000000)
> -		return 12000000;
> -
> -	if (req_rate < 36000000)
> -		return 24000000;
> +	if (req->rate < 18000000)
> +		req->rate = 12000000;
> +	else if (req->rate < 36000000)
> +		req->rate = 24000000;
> +	else
> +		req->rate = 48000000;
>  
> -	return 48000000;
> +	return 0;
>  }
>  
>  static int x1000_otg_phy_set_rate(struct clk_hw *hw, unsigned long
> req_rate,
> @@ -161,7 +162,7 @@ static int x1000_usb_phy_is_enabled(struct clk_hw
> *hw)
>  
>  static const struct clk_ops x1000_otg_phy_ops = {
>  	.recalc_rate = x1000_otg_phy_recalc_rate,
> -	.round_rate = x1000_otg_phy_round_rate,
> +	.determine_rate = x1000_otg_phy_determine_rate,
>  	.set_rate = x1000_otg_phy_set_rate,
>  
>  	.enable		= x1000_usb_phy_enable,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ