From 70f49f55a15ea3028403c970d356f86d7fa9cff1 Mon Sep 17 00:00:00 2001 From: Thorsten Blum Date: Thu, 1 Oct 2026 23:16:10 +0200 Subject: [PATCH] hwrng: stm32 - reuse clock rate in stm32_rng_clock_freq_restrain() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 acked-by: Maxime Méré Signed-off-by: Herbert Xu --- 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 9114efc90d1c..bcec6f0b9bb1 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; }