Commit e4dcc1be authored by Hans de Goede's avatar Hans de Goede Committed by Herbert Xu

crypto: arm - Rename functions to avoid conflict with crypto/sha256.h

Rename static / file-local functions so that they do not conflict with
the functions declared in crypto/sha256.h.

This is a preparation patch for folding crypto/sha256.h into crypto/sha.h.
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 2a4bfd02
...@@ -39,7 +39,7 @@ int crypto_sha256_arm_update(struct shash_desc *desc, const u8 *data, ...@@ -39,7 +39,7 @@ int crypto_sha256_arm_update(struct shash_desc *desc, const u8 *data,
} }
EXPORT_SYMBOL(crypto_sha256_arm_update); EXPORT_SYMBOL(crypto_sha256_arm_update);
static int sha256_final(struct shash_desc *desc, u8 *out) static int crypto_sha256_arm_final(struct shash_desc *desc, u8 *out)
{ {
sha256_base_do_finalize(desc, sha256_base_do_finalize(desc,
(sha256_block_fn *)sha256_block_data_order); (sha256_block_fn *)sha256_block_data_order);
...@@ -51,7 +51,7 @@ int crypto_sha256_arm_finup(struct shash_desc *desc, const u8 *data, ...@@ -51,7 +51,7 @@ int crypto_sha256_arm_finup(struct shash_desc *desc, const u8 *data,
{ {
sha256_base_do_update(desc, data, len, sha256_base_do_update(desc, data, len,
(sha256_block_fn *)sha256_block_data_order); (sha256_block_fn *)sha256_block_data_order);
return sha256_final(desc, out); return crypto_sha256_arm_final(desc, out);
} }
EXPORT_SYMBOL(crypto_sha256_arm_finup); EXPORT_SYMBOL(crypto_sha256_arm_finup);
...@@ -59,7 +59,7 @@ static struct shash_alg algs[] = { { ...@@ -59,7 +59,7 @@ static struct shash_alg algs[] = { {
.digestsize = SHA256_DIGEST_SIZE, .digestsize = SHA256_DIGEST_SIZE,
.init = sha256_base_init, .init = sha256_base_init,
.update = crypto_sha256_arm_update, .update = crypto_sha256_arm_update,
.final = sha256_final, .final = crypto_sha256_arm_final,
.finup = crypto_sha256_arm_finup, .finup = crypto_sha256_arm_finup,
.descsize = sizeof(struct sha256_state), .descsize = sizeof(struct sha256_state),
.base = { .base = {
...@@ -73,7 +73,7 @@ static struct shash_alg algs[] = { { ...@@ -73,7 +73,7 @@ static struct shash_alg algs[] = { {
.digestsize = SHA224_DIGEST_SIZE, .digestsize = SHA224_DIGEST_SIZE,
.init = sha224_base_init, .init = sha224_base_init,
.update = crypto_sha256_arm_update, .update = crypto_sha256_arm_update,
.final = sha256_final, .final = crypto_sha256_arm_final,
.finup = crypto_sha256_arm_finup, .finup = crypto_sha256_arm_finup,
.descsize = sizeof(struct sha256_state), .descsize = sizeof(struct sha256_state),
.base = { .base = {
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
asmlinkage void sha256_block_data_order_neon(u32 *digest, const void *data, asmlinkage void sha256_block_data_order_neon(u32 *digest, const void *data,
unsigned int num_blks); unsigned int num_blks);
static int sha256_update(struct shash_desc *desc, const u8 *data, static int crypto_sha256_neon_update(struct shash_desc *desc, const u8 *data,
unsigned int len) unsigned int len)
{ {
struct sha256_state *sctx = shash_desc_ctx(desc); struct sha256_state *sctx = shash_desc_ctx(desc);
...@@ -42,7 +42,7 @@ static int sha256_update(struct shash_desc *desc, const u8 *data, ...@@ -42,7 +42,7 @@ static int sha256_update(struct shash_desc *desc, const u8 *data,
return 0; return 0;
} }
static int sha256_finup(struct shash_desc *desc, const u8 *data, static int crypto_sha256_neon_finup(struct shash_desc *desc, const u8 *data,
unsigned int len, u8 *out) unsigned int len, u8 *out)
{ {
if (!crypto_simd_usable()) if (!crypto_simd_usable())
...@@ -59,17 +59,17 @@ static int sha256_finup(struct shash_desc *desc, const u8 *data, ...@@ -59,17 +59,17 @@ static int sha256_finup(struct shash_desc *desc, const u8 *data,
return sha256_base_finish(desc, out); return sha256_base_finish(desc, out);
} }
static int sha256_final(struct shash_desc *desc, u8 *out) static int crypto_sha256_neon_final(struct shash_desc *desc, u8 *out)
{ {
return sha256_finup(desc, NULL, 0, out); return crypto_sha256_neon_finup(desc, NULL, 0, out);
} }
struct shash_alg sha256_neon_algs[] = { { struct shash_alg sha256_neon_algs[] = { {
.digestsize = SHA256_DIGEST_SIZE, .digestsize = SHA256_DIGEST_SIZE,
.init = sha256_base_init, .init = sha256_base_init,
.update = sha256_update, .update = crypto_sha256_neon_update,
.final = sha256_final, .final = crypto_sha256_neon_final,
.finup = sha256_finup, .finup = crypto_sha256_neon_finup,
.descsize = sizeof(struct sha256_state), .descsize = sizeof(struct sha256_state),
.base = { .base = {
.cra_name = "sha256", .cra_name = "sha256",
...@@ -81,9 +81,9 @@ struct shash_alg sha256_neon_algs[] = { { ...@@ -81,9 +81,9 @@ struct shash_alg sha256_neon_algs[] = { {
}, { }, {
.digestsize = SHA224_DIGEST_SIZE, .digestsize = SHA224_DIGEST_SIZE,
.init = sha224_base_init, .init = sha224_base_init,
.update = sha256_update, .update = crypto_sha256_neon_update,
.final = sha256_final, .final = crypto_sha256_neon_final,
.finup = sha256_finup, .finup = crypto_sha256_neon_finup,
.descsize = sizeof(struct sha256_state), .descsize = sizeof(struct sha256_state),
.base = { .base = {
.cra_name = "sha224", .cra_name = "sha224",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment