Commit cf3f9609 authored by Gilad Ben-Yossef's avatar Gilad Ben-Yossef Committed by Herbert Xu

crypto: testmgr - use consistent format for errors

Fix inconsistent format and spelling in hash tests error messages.
Signed-off-by: default avatarGilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent b1a4b182
...@@ -218,14 +218,14 @@ static int ahash_partial_update(struct ahash_request **preq, ...@@ -218,14 +218,14 @@ static int ahash_partial_update(struct ahash_request **preq,
crypto_ahash_reqtfm(req)); crypto_ahash_reqtfm(req));
state = kmalloc(statesize + sizeof(guard), GFP_KERNEL); state = kmalloc(statesize + sizeof(guard), GFP_KERNEL);
if (!state) { if (!state) {
pr_err("alt: hash: Failed to alloc state for %s\n", algo); pr_err("alg: hash: Failed to alloc state for %s\n", algo);
goto out_nostate; goto out_nostate;
} }
memcpy(state + statesize, guard, sizeof(guard)); memcpy(state + statesize, guard, sizeof(guard));
ret = crypto_ahash_export(req, state); ret = crypto_ahash_export(req, state);
WARN_ON(memcmp(state + statesize, guard, sizeof(guard))); WARN_ON(memcmp(state + statesize, guard, sizeof(guard)));
if (ret) { if (ret) {
pr_err("alt: hash: Failed to export() for %s\n", algo); pr_err("alg: hash: Failed to export() for %s\n", algo);
goto out; goto out;
} }
ahash_request_free(req); ahash_request_free(req);
...@@ -344,19 +344,19 @@ static int __test_hash(struct crypto_ahash *tfm, ...@@ -344,19 +344,19 @@ static int __test_hash(struct crypto_ahash *tfm,
} else { } else {
ret = wait_async_op(&tresult, crypto_ahash_init(req)); ret = wait_async_op(&tresult, crypto_ahash_init(req));
if (ret) { if (ret) {
pr_err("alt: hash: init failed on test %d " pr_err("alg: hash: init failed on test %d "
"for %s: ret=%d\n", j, algo, -ret); "for %s: ret=%d\n", j, algo, -ret);
goto out; goto out;
} }
ret = wait_async_op(&tresult, crypto_ahash_update(req)); ret = wait_async_op(&tresult, crypto_ahash_update(req));
if (ret) { if (ret) {
pr_err("alt: hash: update failed on test %d " pr_err("alg: hash: update failed on test %d "
"for %s: ret=%d\n", j, algo, -ret); "for %s: ret=%d\n", j, algo, -ret);
goto out; goto out;
} }
ret = wait_async_op(&tresult, crypto_ahash_final(req)); ret = wait_async_op(&tresult, crypto_ahash_final(req));
if (ret) { if (ret) {
pr_err("alt: hash: final failed on test %d " pr_err("alg: hash: final failed on test %d "
"for %s: ret=%d\n", j, algo, -ret); "for %s: ret=%d\n", j, algo, -ret);
goto out; goto out;
} }
...@@ -488,13 +488,13 @@ static int __test_hash(struct crypto_ahash *tfm, ...@@ -488,13 +488,13 @@ static int __test_hash(struct crypto_ahash *tfm,
ahash_request_set_crypt(req, sg, result, template[i].tap[0]); ahash_request_set_crypt(req, sg, result, template[i].tap[0]);
ret = wait_async_op(&tresult, crypto_ahash_init(req)); ret = wait_async_op(&tresult, crypto_ahash_init(req));
if (ret) { if (ret) {
pr_err("alt: hash: init failed on test %d for %s: ret=%d\n", pr_err("alg: hash: init failed on test %d for %s: ret=%d\n",
j, algo, -ret); j, algo, -ret);
goto out; goto out;
} }
ret = wait_async_op(&tresult, crypto_ahash_update(req)); ret = wait_async_op(&tresult, crypto_ahash_update(req));
if (ret) { if (ret) {
pr_err("alt: hash: update failed on test %d for %s: ret=%d\n", pr_err("alg: hash: update failed on test %d for %s: ret=%d\n",
j, algo, -ret); j, algo, -ret);
goto out; goto out;
} }
...@@ -505,7 +505,7 @@ static int __test_hash(struct crypto_ahash *tfm, ...@@ -505,7 +505,7 @@ static int __test_hash(struct crypto_ahash *tfm,
hash_buff, k, temp, &sg[0], algo, result, hash_buff, k, temp, &sg[0], algo, result,
&tresult); &tresult);
if (ret) { if (ret) {
pr_err("hash: partial update failed on test %d for %s: ret=%d\n", pr_err("alg: hash: partial update failed on test %d for %s: ret=%d\n",
j, algo, -ret); j, algo, -ret);
goto out_noreq; goto out_noreq;
} }
...@@ -513,7 +513,7 @@ static int __test_hash(struct crypto_ahash *tfm, ...@@ -513,7 +513,7 @@ static int __test_hash(struct crypto_ahash *tfm,
} }
ret = wait_async_op(&tresult, crypto_ahash_final(req)); ret = wait_async_op(&tresult, crypto_ahash_final(req));
if (ret) { if (ret) {
pr_err("alt: hash: final failed on test %d for %s: ret=%d\n", pr_err("alg: hash: final failed on test %d for %s: ret=%d\n",
j, algo, -ret); j, algo, -ret);
goto out; goto out;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment