projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ce6330f
)
crypto: hisilicon/trng - fix local variable type
author
Weili Qian
<qianweili@huawei.com>
Thu, 9 Jun 2022 11:18:19 +0000
(19:18 +0800)
committer
Herbert Xu
<herbert@gondor.apana.org.au>
Fri, 17 Jun 2022 09:19:20 +0000
(17:19 +0800)
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>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/hisilicon/trng/trng.c
patch
|
blob
|
history
diff --git
a/drivers/crypto/hisilicon/trng/trng.c
b/drivers/crypto/hisilicon/trng/trng.c
index 829f2caf0f67fd675b43b980fa0db4ab22b79d68..97e500db0a8259b27f7186453f9153a55ad805d8 100644
(file)
--- 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);