From: Herbert Xu Date: Mon, 18 Jul 2016 10:20:10 +0000 (+0800) Subject: crypto: testmgr - Print akcipher algorithm name X-Git-Tag: v4.14-rc1~2841^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=15226e4804e244c2dd51db2a3a2c2b5c9dd65874;p=platform%2Fkernel%2Flinux-rpi.git crypto: testmgr - Print akcipher algorithm name When an akcipher test fails, we don't know which algorithm failed because the name is not printed. This patch fixes this. Signed-off-by: Herbert Xu --- diff --git a/crypto/testmgr.c b/crypto/testmgr.c index 769cc2a..5c9d5a5 100644 --- a/crypto/testmgr.c +++ b/crypto/testmgr.c @@ -2034,6 +2034,8 @@ free_xbuf: static int test_akcipher(struct crypto_akcipher *tfm, const char *alg, struct akcipher_testvec *vecs, unsigned int tcount) { + const char *algo = + crypto_tfm_alg_driver_name(crypto_akcipher_tfm(tfm)); int ret, i; for (i = 0; i < tcount; i++) { @@ -2041,8 +2043,8 @@ static int test_akcipher(struct crypto_akcipher *tfm, const char *alg, if (!ret) continue; - pr_err("alg: akcipher: test failed on vector %d, err=%d\n", - i + 1, ret); + pr_err("alg: akcipher: test %d failed for %s, err=%d\n", + i + 1, algo, ret); return ret; } return 0;