Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+60 −63
Original line number Diff line number Diff line
@@ -311,7 +311,9 @@ static int __test_hash(struct crypto_ahash *tfm, struct hash_testvec *template,
		if (align_offset != 0)
			break;

		if (template[i].np) {
		if (!template[i].np)
			continue;

		j++;
		memset(result, 0, MAX_DIGEST_SIZE);

@@ -334,27 +336,23 @@ static int __test_hash(struct crypto_ahash *tfm, struct hash_testvec *template,
		if (template[i].ksize) {
			if (template[i].ksize > MAX_KEYLEN) {
				pr_err("alg: hash: setkey failed on test %d for %s: key size %d > %d\n",
					       j, algo, template[i].ksize,
					       MAX_KEYLEN);
				       j, algo, template[i].ksize, MAX_KEYLEN);
				ret = -EINVAL;
				goto out;
			}
			crypto_ahash_clear_flags(tfm, ~0);
			memcpy(key, template[i].key, template[i].ksize);
				ret = crypto_ahash_setkey(tfm, key,
							  template[i].ksize);
			ret = crypto_ahash_setkey(tfm, key, template[i].ksize);

			if (ret) {
				printk(KERN_ERR "alg: hash: setkey "
				       "failed on chunking test %d "
					       "for %s: ret=%d\n", j, algo,
					       -ret);
				       "for %s: ret=%d\n", j, algo, -ret);
				goto out;
			}
		}

			ahash_request_set_crypt(req, sg, result,
						template[i].psize);
		ahash_request_set_crypt(req, sg, result, template[i].psize);
		ret = crypto_ahash_digest(req);
		switch (ret) {
		case 0:
@@ -384,7 +382,6 @@ static int __test_hash(struct crypto_ahash *tfm, struct hash_testvec *template,
			goto out;
		}
	}
	}

	ret = 0;