Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hwrng: stm32 - reuse clock rate in stm32_rng_clock_freq_restrain()
@ 2026-10-01 21:16 Thorsten Blum
  2026-10-02  7:39 ` Maxime MERE
  2026-10-08  8:31 ` Herbert Xu
  0 siblings, 2 replies; 3+ messages in thread
From: Thorsten Blum @ 2026-10-01 21:16 UTC (permalink / raw)
  To: Olivia Mackall, Herbert Xu, Maxime Coquelin, Alexandre Torgue,
	Linus Walleij, Can Peng
  Cc: Thorsten Blum, linux-crypto, linux-stm32, linux-arm-kernel,
	linux-kernel

Reuse clock_rate and avoid calling clk_get_rate() again. Remove the
extra space before the colon while at it.

Signed-off-by: Thorsten Blum <blum@kernel.org>
---
 drivers/char/hw_random/stm32-rng.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/char/hw_random/stm32-rng.c b/drivers/char/hw_random/stm32-rng.c
index d3fc910f674a..319944d92b82 100644
--- a/drivers/char/hw_random/stm32-rng.c
+++ b/drivers/char/hw_random/stm32-rng.c
@@ -277,7 +277,7 @@ static uint stm32_rng_clock_freq_restrain(struct hwrng *rng)
 	while ((clock_rate >> clock_div) > priv->data->max_clock_rate)
 		clock_div++;
 
-	pr_debug("RNG clk rate : %lu\n", clk_get_rate(priv->clk_bulk[0].clk) >> clock_div);
+	pr_debug("RNG clk rate: %lu\n", clock_rate >> clock_div);
 
 	return clock_div;
 }


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] hwrng: stm32 - reuse clock rate in stm32_rng_clock_freq_restrain()
  2026-10-01 21:16 [PATCH] hwrng: stm32 - reuse clock rate in stm32_rng_clock_freq_restrain() Thorsten Blum
@ 2026-10-02  7:39 ` Maxime MERE
  2026-10-08  8:31 ` Herbert Xu
  1 sibling, 0 replies; 3+ messages in thread
From: Maxime MERE @ 2026-10-02  7:39 UTC (permalink / raw)
  To: Thorsten Blum, Olivia Mackall, Herbert Xu, Maxime Coquelin,
	Alexandre Torgue, Linus Walleij, Can Peng
  Cc: linux-crypto, linux-stm32, linux-arm-kernel, linux-kernel

acked-by: Maxime Méré <maxime.mere@foss.st.com>

On 10/1/26 23:16, Thorsten Blum wrote:
> Reuse clock_rate and avoid calling clk_get_rate() again. Remove the
> extra space before the colon while at it.
> 
> Signed-off-by: Thorsten Blum <blum@kernel.org>
> ---
>   drivers/char/hw_random/stm32-rng.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/char/hw_random/stm32-rng.c b/drivers/char/hw_random/stm32-rng.c
> index d3fc910f674a..319944d92b82 100644
> --- a/drivers/char/hw_random/stm32-rng.c
> +++ b/drivers/char/hw_random/stm32-rng.c
> @@ -277,7 +277,7 @@ static uint stm32_rng_clock_freq_restrain(struct hwrng *rng)
>   	while ((clock_rate >> clock_div) > priv->data->max_clock_rate)
>   		clock_div++;
>   
> -	pr_debug("RNG clk rate : %lu\n", clk_get_rate(priv->clk_bulk[0].clk) >> clock_div);
> +	pr_debug("RNG clk rate: %lu\n", clock_rate >> clock_div);
>   
>   	return clock_div;
>   }
> 



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] hwrng: stm32 - reuse clock rate in stm32_rng_clock_freq_restrain()
  2026-10-01 21:16 [PATCH] hwrng: stm32 - reuse clock rate in stm32_rng_clock_freq_restrain() Thorsten Blum
  2026-10-02  7:39 ` Maxime MERE
@ 2026-10-08  8:31 ` Herbert Xu
  1 sibling, 0 replies; 3+ messages in thread
From: Herbert Xu @ 2026-10-08  8:31 UTC (permalink / raw)
  To: Thorsten Blum
  Cc: Olivia Mackall, Maxime Coquelin, Alexandre Torgue, Linus Walleij,
	Can Peng, linux-crypto, linux-stm32, linux-arm-kernel,
	linux-kernel

On Thu, Oct 01, 2026 at 11:16:10PM +0200, Thorsten Blum wrote:
> Reuse clock_rate and avoid calling clk_get_rate() again. Remove the
> extra space before the colon while at it.
> 
> Signed-off-by: Thorsten Blum <blum@kernel.org>
> ---
>  drivers/char/hw_random/stm32-rng.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-10-08  8:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-01 21:16 [PATCH] hwrng: stm32 - reuse clock rate in stm32_rng_clock_freq_restrain() Thorsten Blum
2026-10-02  7:39 ` Maxime MERE
2026-10-08  8:31 ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox