* [PATCH] crypto: hisilicon/trng - fix local variable type
@ 2022-06-09 11:18 Weili Qian
2022-06-17 9:20 ` Herbert Xu
0 siblings, 1 reply; 2+ messages in thread
From: Weili Qian @ 2022-06-09 11:18 UTC (permalink / raw)
To: herbert; +Cc: linux-kernel, linux-crypto, wangzhou1, liulongfang, Weili Qian
The return value of 'readl_poll_timeout' is '0' or '-ETIMEDOUT'. Therefore,
change the local variable 'ret' type from 'u32' to 'int'.
Signed-off-by: Weili Qian <qianweili@huawei.com>
---
drivers/crypto/hisilicon/trng/trng.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/hisilicon/trng/trng.c b/drivers/crypto/hisilicon/trng/trng.c
index 829f2caf0f67..97e500db0a82 100644
--- a/drivers/crypto/hisilicon/trng/trng.c
+++ b/drivers/crypto/hisilicon/trng/trng.c
@@ -185,7 +185,7 @@ static int hisi_trng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
struct hisi_trng *trng;
int currsize = 0;
u32 val = 0;
- u32 ret;
+ int ret;
trng = container_of(rng, struct hisi_trng, rng);
--
2.33.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] crypto: hisilicon/trng - fix local variable type
2022-06-09 11:18 [PATCH] crypto: hisilicon/trng - fix local variable type Weili Qian
@ 2022-06-17 9:20 ` Herbert Xu
0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2022-06-17 9:20 UTC (permalink / raw)
To: Weili Qian; +Cc: linux-kernel, linux-crypto, wangzhou1, liulongfang
On Thu, Jun 09, 2022 at 07:18:19PM +0800, Weili Qian wrote:
> The return value of 'readl_poll_timeout' is '0' or '-ETIMEDOUT'. Therefore,
> change the local variable 'ret' type from 'u32' to 'int'.
>
> Signed-off-by: Weili Qian <qianweili@huawei.com>
> ---
> drivers/crypto/hisilicon/trng/trng.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-06-17 9:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-09 11:18 [PATCH] crypto: hisilicon/trng - fix local variable type Weili Qian
2022-06-17 9:20 ` Herbert Xu
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.