mirror of https://lore.kernel.org/lkml/
 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
  0 siblings, 1 reply; 2+ 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	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-10-02  7:39 UTC | newest]

Thread overview: 2+ 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

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

all inboxes | Powered by JetHome®