Skip to content

Commit 6e8f972

Browse files
ebiggersherbertx
authored andcommitted
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: kernel test robot <lkp@intel.com> Cc: sparclinux@vger.kernel.org Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent e79a317 commit 6e8f972

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

‎arch/sparc/crypto/sha256_glue.c‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ static int sha256_sparc64_import(struct shash_desc *desc, const void *in)
156156
return 0;
157157
}
158158

159-
static struct shash_alg sha256 = {
159+
static struct shash_alg sha256_alg = {
160160
.digestsize = SHA256_DIGEST_SIZE,
161161
.init = sha256_sparc64_init,
162162
.update = sha256_sparc64_update,
@@ -174,7 +174,7 @@ static struct shash_alg sha256 = {
174174
}
175175
};
176176

177-
static struct shash_alg sha224 = {
177+
static struct shash_alg sha224_alg = {
178178
.digestsize = SHA224_DIGEST_SIZE,
179179
.init = sha224_sparc64_init,
180180
.update = sha256_sparc64_update,
@@ -206,13 +206,13 @@ static bool __init sparc64_has_sha256_opcode(void)
206206
static int __init sha256_sparc64_mod_init(void)
207207
{
208208
if (sparc64_has_sha256_opcode()) {
209-
int ret = crypto_register_shash(&sha224);
209+
int ret = crypto_register_shash(&sha224_alg);
210210
if (ret < 0)
211211
return ret;
212212

213-
ret = crypto_register_shash(&sha256);
213+
ret = crypto_register_shash(&sha256_alg);
214214
if (ret < 0) {
215-
crypto_unregister_shash(&sha224);
215+
crypto_unregister_shash(&sha224_alg);
216216
return ret;
217217
}
218218

@@ -225,8 +225,8 @@ static int __init sha256_sparc64_mod_init(void)
225225

226226
static void __exit sha256_sparc64_mod_fini(void)
227227
{
228-
crypto_unregister_shash(&sha224);
229-
crypto_unregister_shash(&sha256);
228+
crypto_unregister_shash(&sha224_alg);
229+
crypto_unregister_shash(&sha256_alg);
230230
}
231231

232232
module_init(sha256_sparc64_mod_init);

0 commit comments

Comments
 (0)