aboutsummaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorCristian Stoica <cristian.stoica@freescale.com>2014-08-08 05:30:04 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2014-08-25 08:32:32 -0400
commitd4c85f9bb53f25491524839ab1610b30810ab898 (patch)
tree37849392573ec30e99c2a428696759adec54a377 /crypto
parentad61e042e9151b55b393d5875e467e7fe0c7470c (diff)
crypto: testmgr - remove unused function argument
The argument "req" of do_one_async_hash_op is not used by the function. This patch removes this argument and renames the function to match more closely its purpose. Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/testmgr.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/crypto/testmgr.c b/crypto/testmgr.c
index f217c622bc41..f90e91c5e47a 100644
--- a/crypto/testmgr.c
+++ b/crypto/testmgr.c
@@ -178,9 +178,7 @@ static void testmgr_free_buf(char *buf[XBUFSIZE])
178 free_page((unsigned long)buf[i]); 178 free_page((unsigned long)buf[i]);
179} 179}
180 180
181static int do_one_async_hash_op(struct ahash_request *req, 181static int wait_async_op(struct tcrypt_result *tr, int ret)
182 struct tcrypt_result *tr,
183 int ret)
184{ 182{
185 if (ret == -EINPROGRESS || ret == -EBUSY) { 183 if (ret == -EINPROGRESS || ret == -EBUSY) {
186 ret = wait_for_completion_interruptible(&tr->completion); 184 ret = wait_for_completion_interruptible(&tr->completion);
@@ -264,30 +262,26 @@ static int __test_hash(struct crypto_ahash *tfm, struct hash_testvec *template,
264 262
265 ahash_request_set_crypt(req, sg, result, template[i].psize); 263 ahash_request_set_crypt(req, sg, result, template[i].psize);
266 if (use_digest) { 264 if (use_digest) {
267 ret = do_one_async_hash_op(req, &tresult, 265 ret = wait_async_op(&tresult, crypto_ahash_digest(req));
268 crypto_ahash_digest(req));
269 if (ret) { 266 if (ret) {
270 pr_err("alg: hash: digest failed on test %d " 267 pr_err("alg: hash: digest failed on test %d "
271 "for %s: ret=%d\n", j, algo, -ret); 268 "for %s: ret=%d\n", j, algo, -ret);
272 goto out; 269 goto out;
273 } 270 }
274 } else { 271 } else {
275 ret = do_one_async_hash_op(req, &tresult, 272 ret = wait_async_op(&tresult, crypto_ahash_init(req));
276 crypto_ahash_init(req));
277 if (ret) { 273 if (ret) {
278 pr_err("alt: hash: init failed on test %d " 274 pr_err("alt: hash: init failed on test %d "
279 "for %s: ret=%d\n", j, algo, -ret); 275 "for %s: ret=%d\n", j, algo, -ret);
280 goto out; 276 goto out;
281 } 277 }
282 ret = do_one_async_hash_op(req, &tresult, 278 ret = wait_async_op(&tresult, crypto_ahash_update(req));
283 crypto_ahash_update(req));
284 if (ret) { 279 if (ret) {
285 pr_err("alt: hash: update failed on test %d " 280 pr_err("alt: hash: update failed on test %d "
286 "for %s: ret=%d\n", j, algo, -ret); 281 "for %s: ret=%d\n", j, algo, -ret);
287 goto out; 282 goto out;
288 } 283 }
289 ret = do_one_async_hash_op(req, &tresult, 284 ret = wait_async_op(&tresult, crypto_ahash_final(req));
290 crypto_ahash_final(req));
291 if (ret) { 285 if (ret) {
292 pr_err("alt: hash: final failed on test %d " 286 pr_err("alt: hash: final failed on test %d "
293 "for %s: ret=%d\n", j, algo, -ret); 287 "for %s: ret=%d\n", j, algo, -ret);