hwrng: stm32 - reuse clock rate in stm32_rng_clock_freq_restrain()
Subsystems (3)
PATCH 1/1 hwrng: stm32 - reuse clock rate in stm32_rng_clock_freq_restrain()
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 <[email protected]>
--- drivers/char/hw_random/stm32-rng.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/char/hw_random/stm32-rng.c +1 -1
@@ -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; }
Acked-by Maxime Méré <[email protected]>
Quoted 22 lines · Thorsten Blum
Reuse
clock_rateand avoid callingclk_get_rate()again. Remove the extra space before the colon while at it.Signed-off-by Thorsten Blum <[email protected]>--- drivers/char/hw_random/stm32-rng.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/char/hw_random/stm32-rng.c +1
-1@@ -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; }
Herbert Xu
maintainerQuoted 7 lines · Thorsten Blum
Reuse
clock_rateand avoid callingclk_get_rate()again. Remove the extra space before the colon while at it.Signed-off-by Thorsten Blum <[email protected]>--- drivers/char/hw_random/stm32-rng.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Patch applied. Thanks.
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt