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: <6172340.lOV4Wx5bFT@dell>
Date: Sun, 13 Jul 2025 22:35:06 +0200
From: Janusz Krzysztofik <jmkrzyszt@...il.com>
To: Paul Walmsley <paul@...an.com>, Aaro Koskinen <aaro.koskinen@....fi>,
 Tony Lindgren <tony@...mide.com>, Russell King <linux@...linux.org.uk>,
 Andreas Kemnade <andreas@...nade.info>, Kevin Hilman <khilman@...libre.com>,
 Roger Quadros <rogerq@...nel.org>, Linus Walleij <linus.walleij@...aro.org>,
 Liviu Dudau <liviu.dudau@....com>, Sudeep Holla <sudeep.holla@....com>,
 Lorenzo Pieralisi <lpieralisi@...nel.org>,
 Maxime Ripard <mripard@...nel.org>, Stephen Boyd <sboyd@...nel.org>,
 Brian Masney <bmasney@...hat.com>
Cc: linux-clk@...r.kernel.org, linux-omap@...r.kernel.org,
 linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
 Brian Masney <bmasney@...hat.com>
Subject:
 Re: [PATCH 1/3] ARM: OMAP1: clock: convert from round_rate() to
 determine_rate()

On Friday, 11 July 2025 01:42:16 CEST Brian Masney wrote:
> 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>

Acked-by: Janusz Krzysztofik <jmkrzyszt@...il.com>

> ---
>  arch/arm/mach-omap1/clock.c | 19 +++++++++++++------
>  1 file changed, 13 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/arm/mach-omap1/clock.c b/arch/arm/mach-omap1/clock.c
> index 83381e23fab983522ca01b8feffb861b02fee730..afc6404f62d39c4ddbac6f1ee04d889be6c47186 100644
> --- a/arch/arm/mach-omap1/clock.c
> +++ b/arch/arm/mach-omap1/clock.c
> @@ -705,14 +705,21 @@ static unsigned long omap1_clk_recalc_rate(struct clk_hw *hw, unsigned long p_ra
>  	return clk->rate;
>  }
>  
> -static long omap1_clk_round_rate(struct clk_hw *hw, unsigned long rate, unsigned long *p_rate)
> +static int omap1_clk_determine_rate(struct clk_hw *hw,
> +				    struct clk_rate_request *req)
>  {
>  	struct omap1_clk *clk = to_omap1_clk(hw);
>  
> -	if (clk->round_rate != NULL)
> -		return clk->round_rate(clk, rate, p_rate);
> +	if (clk->round_rate != NULL) {
> +		req->rate = clk->round_rate(clk, req->rate,
> +					    &req->best_parent_rate);
>  
> -	return omap1_clk_recalc_rate(hw, *p_rate);
> +		return 0;
> +	}
> +
> +	req->rate = omap1_clk_recalc_rate(hw, req->best_parent_rate);
> +
> +	return 0;
>  }
>  
>  static int omap1_clk_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long p_rate)
> @@ -771,7 +778,7 @@ const struct clk_ops omap1_clk_gate_ops = {
>  
>  const struct clk_ops omap1_clk_rate_ops = {
>  	.recalc_rate	= omap1_clk_recalc_rate,
> -	.round_rate	= omap1_clk_round_rate,
> +	.determine_rate = omap1_clk_determine_rate,
>  	.set_rate	= omap1_clk_set_rate,
>  	.init		= omap1_clk_init_op,
>  };
> @@ -784,7 +791,7 @@ const struct clk_ops omap1_clk_full_ops = {
>  	.disable_unused	= omap1_clk_disable_unused,
>  #endif
>  	.recalc_rate	= omap1_clk_recalc_rate,
> -	.round_rate	= omap1_clk_round_rate,
> +	.determine_rate = omap1_clk_determine_rate,
>  	.set_rate	= omap1_clk_set_rate,
>  	.init		= omap1_clk_init_op,
>  };
> 
> 


Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ