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

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