mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-22 15:14:35 +00:00
crypto: tcrypt - Handle async return from crypto_ahash_init
The function crypto_ahash_init can also be asynchronous just like update and final. So all callers must be able to handle an async return. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
b617b702da
commit
43a9607d86
1 changed files with 3 additions and 3 deletions
|
@ -808,7 +808,7 @@ static int test_ahash_jiffies(struct ahash_request *req, int blen,
|
||||||
|
|
||||||
for (start = jiffies, end = start + secs * HZ, bcount = 0;
|
for (start = jiffies, end = start + secs * HZ, bcount = 0;
|
||||||
time_before(jiffies, end); bcount++) {
|
time_before(jiffies, end); bcount++) {
|
||||||
ret = crypto_ahash_init(req);
|
ret = do_one_ahash_op(req, crypto_ahash_init(req));
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
for (pcount = 0; pcount < blen; pcount += plen) {
|
for (pcount = 0; pcount < blen; pcount += plen) {
|
||||||
|
@ -877,7 +877,7 @@ static int test_ahash_cycles(struct ahash_request *req, int blen,
|
||||||
|
|
||||||
/* Warm-up run. */
|
/* Warm-up run. */
|
||||||
for (i = 0; i < 4; i++) {
|
for (i = 0; i < 4; i++) {
|
||||||
ret = crypto_ahash_init(req);
|
ret = do_one_ahash_op(req, crypto_ahash_init(req));
|
||||||
if (ret)
|
if (ret)
|
||||||
goto out;
|
goto out;
|
||||||
for (pcount = 0; pcount < blen; pcount += plen) {
|
for (pcount = 0; pcount < blen; pcount += plen) {
|
||||||
|
@ -896,7 +896,7 @@ static int test_ahash_cycles(struct ahash_request *req, int blen,
|
||||||
|
|
||||||
start = get_cycles();
|
start = get_cycles();
|
||||||
|
|
||||||
ret = crypto_ahash_init(req);
|
ret = do_one_ahash_op(req, crypto_ahash_init(req));
|
||||||
if (ret)
|
if (ret)
|
||||||
goto out;
|
goto out;
|
||||||
for (pcount = 0; pcount < blen; pcount += plen) {
|
for (pcount = 0; pcount < blen; pcount += plen) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue