Re: [PATCH v6 2/2] hwrng: starfive: rework clk/reset teardown order for JHB100

From: Herbert Xu

Date: Thu Jul 30 2026 - 03:28:13 EST


On Thu, Jul 23, 2026 at 03:52:06PM +0800, lianfeng.ouyang wrote:
>
> + if (!wait && !mutex_trylock(&trng->lock))
> + return -EAGAIN;
> +
> + mutex_lock(&trng->lock);

Did you actually test this? If mutex_trylock succeeds wouldn't
the subsequent mutex_lock immediately dead-lock?

Something's wrong with your patches and Sashiko couldn't apply
them at all:

https://sashiko.dev/#/patchset/20260723075206.3032-1-lianfeng.ouyang%40starfivetech.com

Thanks,
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt