Commit 5f2b424e authored by Cristian Stoica's avatar Cristian Stoica Committed by Herbert Xu

crypto: testmgr - white space removal on __test_hash

This patch inverts one if condition to remove code block indentation.
Several white space clean-ups follow.
Signed-off-by: default avatarCristian Stoica <cristian.stoica@freescale.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 05b1d338
...@@ -311,7 +311,9 @@ static int __test_hash(struct crypto_ahash *tfm, struct hash_testvec *template, ...@@ -311,7 +311,9 @@ static int __test_hash(struct crypto_ahash *tfm, struct hash_testvec *template,
if (align_offset != 0) if (align_offset != 0)
break; break;
if (template[i].np) { if (!template[i].np)
continue;
j++; j++;
memset(result, 0, MAX_DIGEST_SIZE); memset(result, 0, MAX_DIGEST_SIZE);
...@@ -334,27 +336,23 @@ static int __test_hash(struct crypto_ahash *tfm, struct hash_testvec *template, ...@@ -334,27 +336,23 @@ static int __test_hash(struct crypto_ahash *tfm, struct hash_testvec *template,
if (template[i].ksize) { if (template[i].ksize) {
if (template[i].ksize > MAX_KEYLEN) { if (template[i].ksize > MAX_KEYLEN) {
pr_err("alg: hash: setkey failed on test %d for %s: key size %d > %d\n", pr_err("alg: hash: setkey failed on test %d for %s: key size %d > %d\n",
j, algo, template[i].ksize, j, algo, template[i].ksize, MAX_KEYLEN);
MAX_KEYLEN);
ret = -EINVAL; ret = -EINVAL;
goto out; goto out;
} }
crypto_ahash_clear_flags(tfm, ~0); crypto_ahash_clear_flags(tfm, ~0);
memcpy(key, template[i].key, template[i].ksize); memcpy(key, template[i].key, template[i].ksize);
ret = crypto_ahash_setkey(tfm, key, ret = crypto_ahash_setkey(tfm, key, template[i].ksize);
template[i].ksize);
if (ret) { if (ret) {
printk(KERN_ERR "alg: hash: setkey " printk(KERN_ERR "alg: hash: setkey "
"failed on chunking test %d " "failed on chunking test %d "
"for %s: ret=%d\n", j, algo, "for %s: ret=%d\n", j, algo, -ret);
-ret);
goto out; goto out;
} }
} }
ahash_request_set_crypt(req, sg, result, ahash_request_set_crypt(req, sg, result, template[i].psize);
template[i].psize);
ret = crypto_ahash_digest(req); ret = crypto_ahash_digest(req);
switch (ret) { switch (ret) {
case 0: case 0:
...@@ -384,7 +382,6 @@ static int __test_hash(struct crypto_ahash *tfm, struct hash_testvec *template, ...@@ -384,7 +382,6 @@ static int __test_hash(struct crypto_ahash *tfm, struct hash_testvec *template,
goto out; goto out;
} }
} }
}
ret = 0; ret = 0;
......
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