From: Thorsten Blum <blum@kernel.org>
To: Olivia Mackall <olivia@selenic.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Linus Walleij <linusw@kernel.org>, Can Peng <pengcan@kylinos.cn>
Cc: Thorsten Blum <blum@kernel.org>,
linux-crypto@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] hwrng: stm32 - reuse clock rate in stm32_rng_clock_freq_restrain()
Date: Thu, 1 Oct 2026 23:16:10 +0200 [thread overview]
Message-ID: <20261001211612.38124-2-blum@kernel.org> (raw)
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;
}
next reply other threads:[~2026-10-01 21:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-01 21:16 Thorsten Blum [this message]
2026-10-02 7:39 ` [PATCH] hwrng: stm32 - reuse clock rate in stm32_rng_clock_freq_restrain() Maxime MERE
2026-10-08 8:31 ` Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261001211612.38124-2-blum@kernel.org \
--to=blum@kernel.org \
--cc=alexandre.torgue@foss.st.com \
--cc=herbert@gondor.apana.org.au \
--cc=linusw@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=olivia@selenic.com \
--cc=pengcan@kylinos.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.