mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
crypto: lib/chacha - remove unused arch-specific init support
All implementations of chacha_init_arch() just call chacha_init_generic(), so it is pointless. Just delete it, and replace chacha_init() with what was previously chacha_init_generic(). Signed-off-by: Eric Biggers <ebiggers@google.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
@@ -66,7 +66,7 @@ static int test_lib_chacha(u8 *revert, u8 *cipher, u8 *plain)
|
||||
}
|
||||
|
||||
/* Encrypt */
|
||||
chacha_init_arch(chacha_state, (u32*)key, iv);
|
||||
chacha_init(chacha_state, (u32 *)key, iv);
|
||||
|
||||
start = ktime_get_ns();
|
||||
chacha_crypt_arch(chacha_state, cipher, plain, data_size, 20);
|
||||
@@ -81,7 +81,7 @@ static int test_lib_chacha(u8 *revert, u8 *cipher, u8 *plain)
|
||||
pr_info("lib encryption took: %lld nsec", end - start);
|
||||
|
||||
/* Decrypt */
|
||||
chacha_init_arch(chacha_state, (u32 *)key, iv);
|
||||
chacha_init(chacha_state, (u32 *)key, iv);
|
||||
|
||||
start = ktime_get_ns();
|
||||
chacha_crypt_arch(chacha_state, revert, cipher, data_size, 20);
|
||||
|
||||
Reference in New Issue
Block a user