Commit 6e8f972f authored by Eric Biggers's avatar Eric Biggers Committed by Herbert Xu

crypto: sparc - rename sha256 to sha256_alg

To avoid a naming collision when we add a sha256() library function,
rename the "sha256" static variable in sha256_glue.c to "sha256_alg".
For consistency, also rename "sha224" to "sha224_alg".
Reported-by: default avatarkernel test robot <lkp@intel.com>
Cc: sparclinux@vger.kernel.org
Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent e79a3171
...@@ -156,7 +156,7 @@ static int sha256_sparc64_import(struct shash_desc *desc, const void *in) ...@@ -156,7 +156,7 @@ static int sha256_sparc64_import(struct shash_desc *desc, const void *in)
return 0; return 0;
} }
static struct shash_alg sha256 = { static struct shash_alg sha256_alg = {
.digestsize = SHA256_DIGEST_SIZE, .digestsize = SHA256_DIGEST_SIZE,
.init = sha256_sparc64_init, .init = sha256_sparc64_init,
.update = sha256_sparc64_update, .update = sha256_sparc64_update,
...@@ -174,7 +174,7 @@ static struct shash_alg sha256 = { ...@@ -174,7 +174,7 @@ static struct shash_alg sha256 = {
} }
}; };
static struct shash_alg sha224 = { static struct shash_alg sha224_alg = {
.digestsize = SHA224_DIGEST_SIZE, .digestsize = SHA224_DIGEST_SIZE,
.init = sha224_sparc64_init, .init = sha224_sparc64_init,
.update = sha256_sparc64_update, .update = sha256_sparc64_update,
...@@ -206,13 +206,13 @@ static bool __init sparc64_has_sha256_opcode(void) ...@@ -206,13 +206,13 @@ static bool __init sparc64_has_sha256_opcode(void)
static int __init sha256_sparc64_mod_init(void) static int __init sha256_sparc64_mod_init(void)
{ {
if (sparc64_has_sha256_opcode()) { if (sparc64_has_sha256_opcode()) {
int ret = crypto_register_shash(&sha224); int ret = crypto_register_shash(&sha224_alg);
if (ret < 0) if (ret < 0)
return ret; return ret;
ret = crypto_register_shash(&sha256); ret = crypto_register_shash(&sha256_alg);
if (ret < 0) { if (ret < 0) {
crypto_unregister_shash(&sha224); crypto_unregister_shash(&sha224_alg);
return ret; return ret;
} }
...@@ -225,8 +225,8 @@ static int __init sha256_sparc64_mod_init(void) ...@@ -225,8 +225,8 @@ static int __init sha256_sparc64_mod_init(void)
static void __exit sha256_sparc64_mod_fini(void) static void __exit sha256_sparc64_mod_fini(void)
{ {
crypto_unregister_shash(&sha224); crypto_unregister_shash(&sha224_alg);
crypto_unregister_shash(&sha256); crypto_unregister_shash(&sha256_alg);
} }
module_init(sha256_sparc64_mod_init); module_init(sha256_sparc64_mod_init);
......
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