* [PATCH linux-next] crypto: sun8i-ce:using the pm_runtime_resume_and_get to simplify the code
@ 2022-08-02 7:48 cgel.zte
2022-08-14 10:13 ` Jernej Škrabec
2022-08-19 11:02 ` Herbert Xu
0 siblings, 2 replies; 3+ messages in thread
From: cgel.zte @ 2022-08-02 7:48 UTC (permalink / raw)
To: linux-kernel
Cc: linux-crypto, linux-arm-kernel, linux-sunxi, ye xingchen, Zeal Robot
From: ye xingchen <ye.xingchen@zte.com.cn>
Using pm_runtime_resume_and_get() to instade of pm_runtime_get_sync
and pm_runtime_put_noidle.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
---
drivers/crypto/allwinner/sun8i-ce/sun8i-ce-trng.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-trng.c b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-trng.c
index 19cd2e52f89d..ef9cfc61af32 100644
--- a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-trng.c
+++ b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-trng.c
@@ -54,9 +54,8 @@ static int sun8i_ce_trng_read(struct hwrng *rng, void *data, size_t max, bool wa
goto err_dst;
}
- err = pm_runtime_get_sync(ce->dev);
+ err = pm_runtime_resume_and_get(ce->dev);
if (err < 0) {
- pm_runtime_put_noidle(ce->dev);
goto err_pm;
}
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH linux-next] crypto: sun8i-ce:using the pm_runtime_resume_and_get to simplify the code
2022-08-02 7:48 [PATCH linux-next] crypto: sun8i-ce:using the pm_runtime_resume_and_get to simplify the code cgel.zte
@ 2022-08-14 10:13 ` Jernej Škrabec
2022-08-19 11:02 ` Herbert Xu
1 sibling, 0 replies; 3+ messages in thread
From: Jernej Škrabec @ 2022-08-14 10:13 UTC (permalink / raw)
To: linux-kernel, cgel.zte
Cc: linux-crypto, linux-arm-kernel, linux-sunxi, ye xingchen, Zeal Robot
Dne torek, 02. avgust 2022 ob 09:48:20 CEST je cgel.zte@gmail.com napisal(a):
> From: ye xingchen <ye.xingchen@zte.com.cn>
>
> Using pm_runtime_resume_and_get() to instade of pm_runtime_get_sync
> and pm_runtime_put_noidle.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
> ---
> drivers/crypto/allwinner/sun8i-ce/sun8i-ce-trng.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-trng.c
> b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-trng.c index
> 19cd2e52f89d..ef9cfc61af32 100644
> --- a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-trng.c
> +++ b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-trng.c
> @@ -54,9 +54,8 @@ static int sun8i_ce_trng_read(struct hwrng *rng, void
> *data, size_t max, bool wa goto err_dst;
> }
>
> - err = pm_runtime_get_sync(ce->dev);
> + err = pm_runtime_resume_and_get(ce->dev);
> if (err < 0) {
> - pm_runtime_put_noidle(ce->dev);
> goto err_pm;
> }
You should also remove braces, since there is only one line left.
With that fixed:
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Best regards,
Jernej
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH linux-next] crypto: sun8i-ce:using the pm_runtime_resume_and_get to simplify the code
2022-08-02 7:48 [PATCH linux-next] crypto: sun8i-ce:using the pm_runtime_resume_and_get to simplify the code cgel.zte
2022-08-14 10:13 ` Jernej Škrabec
@ 2022-08-19 11:02 ` Herbert Xu
1 sibling, 0 replies; 3+ messages in thread
From: Herbert Xu @ 2022-08-19 11:02 UTC (permalink / raw)
To: cgel.zte
Cc: linux-kernel, linux-crypto, linux-arm-kernel, linux-sunxi,
ye.xingchen, zealci
cgel.zte@gmail.com wrote:
> From: ye xingchen <ye.xingchen@zte.com.cn>
>
> Using pm_runtime_resume_and_get() to instade of pm_runtime_get_sync
> and pm_runtime_put_noidle.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
> ---
> drivers/crypto/allwinner/sun8i-ce/sun8i-ce-trng.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
Patch applied. 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-08-19 11:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-02 7:48 [PATCH linux-next] crypto: sun8i-ce:using the pm_runtime_resume_and_get to simplify the code cgel.zte
2022-08-14 10:13 ` Jernej Škrabec
2022-08-19 11:02 ` Herbert Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).