From: Andreas Dilger Date: Sat, 26 Mar 2016 19:40:55 +0000 (-0400) Subject: staging: lustre: libcfs: improve reporting error for crypto performance X-Git-Tag: v4.7-rc1~90^2~525 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=78675cb1abec09f1c93f53457b4f7859273d8d0a;p=karo-tx-linux.git staging: lustre: libcfs: improve reporting error for crypto performance Set cfs_crypto_hash_speeds[X] result to the actual error instead of -1. Make the error message more clear and informative. Signed-off-by: Andreas Dilger Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5053 Reviewed-on: http://review.whamcloud.com/9990 Reviewed-by: Bob Glossman Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-crypto.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-crypto.c index 3d74fd1937c8..aec79165b5c7 100644 --- a/drivers/staging/lustre/lnet/libcfs/linux/linux-crypto.c +++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-crypto.c @@ -339,8 +339,8 @@ static void cfs_crypto_performance_test(enum cfs_crypto_hash_alg hash_alg) __free_page(page); out_err: if (err) { - cfs_crypto_hash_speeds[hash_alg] = -1; - CDEBUG(D_INFO, "Crypto hash algorithm %s, err = %d\n", + cfs_crypto_hash_speeds[hash_alg] = err; + CDEBUG(D_INFO, "Crypto hash algorithm %s test error: rc = %d\n", cfs_crypto_hash_name(hash_alg), err); } else { unsigned long tmp;