diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2016-06-28 16:41:38 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2016-06-28 16:43:40 +0800 |
commit | f8de55b6252b30f9bc1dcb62964f7b49e00983fa (patch) | |
tree | c24543618202a32773403b4c86d738e252af0441 | |
parent | f83f5b12ee674c187f329ef8eb9352dc45dcb25f (diff) | |
download | linux-stable-f8de55b6252b30f9bc1dcb62964f7b49e00983fa.tar.gz linux-stable-f8de55b6252b30f9bc1dcb62964f7b49e00983fa.tar.bz2 linux-stable-f8de55b6252b30f9bc1dcb62964f7b49e00983fa.zip |
crypto: tcrypt - Use unsigned long for mb ahash cycle counter
For the timescales we are working against there is no need to
go beyond unsigned long.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r-- | crypto/tcrypt.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index 8893ba5321b5..59b732722678 100644 --- a/crypto/tcrypt.c +++ b/crypto/tcrypt.c @@ -584,7 +584,7 @@ char result[8][64]; struct ahash_request *req[8]; struct tcrypt_result tresult[8]; char *xbuf[8][XBUFSIZE]; -cycles_t start[8], end[8], mid; +unsigned long start[8], end[8], mid; static void test_mb_ahash_speed(const char *algo, unsigned int sec, struct hash_speed *speed) @@ -593,6 +593,7 @@ static void test_mb_ahash_speed(const char *algo, unsigned int sec, void *hash_buff; int ret = -ENOMEM; struct crypto_ahash *tfm; + unsigned long cycles; tfm = crypto_alloc_ahash(algo, 0, 0); if (IS_ERR(tfm)) { @@ -667,10 +668,9 @@ static void test_mb_ahash_speed(const char *algo, unsigned int sec, end[k] = get_cycles(); } - printk("\nBlock: %lld cycles (%lld cycles/byte), %d bytes\n", - (s64) (end[7]-start[0])/1, - (s64) (end[7]-start[0])/(8*speed[i].blen), - 8*speed[i].blen); + cycles = end[7] - start[0]; + printk("\nBlock: %6lu cycles (%4lu cycles/byte)\n", + cycles, cycles / (8 * speed[i].blen)); } ret = 0; |