Re: [PATCH 05/10] hwrng: stm32 - rework error handling in stm32_rng_read()

Herbert Xu
2023-09-12T04:02:46Z

On Fri, Sep 08, 2023 at 06:51:15PM +0200, Gatien Chevallier wrote:
>
> + if (WARN_ON(sr & RNG_SR_CEIS), "RNG clock too slow - %x\n", sr)

Introducing an unconditional WARN_ON is not acceptable. If you
really need it, make it WARN_ON_ONCE. But why does this need
to be a WARN instead of dev_err?

Cheers,
--
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