[PATCH] hwrng: stm32 - reuse clock rate in stm32_rng_clock_freq_restrain()
Maxime MERE
maxime.mere at foss.st.com
Fri Oct 2 00:39:41 PDT 2026
acked-by: Maxime Méré <maxime.mere at 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 at 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;
> }
>
More information about the linux-arm-kernel
mailing list