From: Herbert Xu <herbert@gondor.apana.org.au>
To: Tomas Marek <tomas.marek@elrest.cz>
Cc: mpm@selenic.com, herbert@gondor.apana.org.au,
mcoquelin.stm32@gmail.com, linux-arm-kernel@lists.infradead.org,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
alexandre.torgue@foss.st.com, oleg.karfich@wago.com
Subject: Re: [PATCH 1/2] hwrng: stm32 - fix number of returned bytes on read
Date: Fri, 21 Oct 2022 18:41:07 +0800 [thread overview]
Message-ID: <Y1J3QwynPFIlfrIv@loth.rohan.me.apana.org.au> (raw)
In-Reply-To: <20221012160924.12226-2-tomas.marek@elrest.cz>
On Wed, Oct 12, 2022 at 06:09:23PM +0200, Tomas Marek wrote:
>
> diff --git a/drivers/char/hw_random/stm32-rng.c b/drivers/char/hw_random/stm32-rng.c
> index bc22178f83e8..8eaacefd498b 100644
> --- a/drivers/char/hw_random/stm32-rng.c
> +++ b/drivers/char/hw_random/stm32-rng.c
> @@ -49,11 +49,13 @@ static int stm32_rng_read(struct hwrng *rng, void *data, size_t max, bool wait)
> /* Manage timeout which is based on timer and take */
> /* care of initial delay time when enabling rng */
> if (!sr && wait) {
> - retval = readl_relaxed_poll_timeout_atomic(priv->base
> + int ret;
> +
> + ret = readl_relaxed_poll_timeout_atomic(priv->base
This would make a lot more sense if you called it err instead of ret.
But as you're fixing a real bug I'm going to apply your patch as is
and you can post an incremental patch to improve it.
Thanks,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-10-21 10:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-12 16:09 [PATCH 0/2] hwrng: stm32 - improve performance Tomas Marek
2022-10-12 16:09 ` [PATCH 1/2] hwrng: stm32 - fix number of returned bytes on read Tomas Marek
2022-10-21 10:41 ` Herbert Xu [this message]
2022-10-25 14:41 ` Tomas Marek
2022-10-12 16:09 ` [PATCH 2/2] hwrng: stm32 - fix read of the last word Tomas Marek
2022-10-21 11:39 ` [PATCH 0/2] hwrng: stm32 - improve performance 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=Y1J3QwynPFIlfrIv@loth.rohan.me.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=alexandre.torgue@foss.st.com \
--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=mpm@selenic.com \
--cc=oleg.karfich@wago.com \
--cc=tomas.marek@elrest.cz \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox