]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
crypto: s390/sha3 - Rename conflicting functions
authorDavid Howells <dhowells@redhat.com>
Sun, 26 Oct 2025 05:50:18 +0000 (22:50 -0700)
committerEric Biggers <ebiggers@kernel.org>
Mon, 3 Nov 2025 17:10:58 +0000 (09:10 -0800)
Rename the s390 sha3_*_init() functions to have an "s390_" prefix to
avoid a name conflict with the upcoming SHA-3 library functions.

Note: this code will be superseded later.  This commit simply keeps the
kernel building for the initial introduction of the library.

[EB: dropped unnecessary rename of import and export functions, and
     improved commit message]

Signed-off-by: David Howells <dhowells@redhat.com>
Tested-by: Harald Freudenberger <freude@linux.ibm.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20251026055032.1413733-2-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
arch/s390/crypto/sha3_256_s390.c
arch/s390/crypto/sha3_512_s390.c

index 03bb4f4bab7015267d3c79552160c5a8fabeca8c..7415d56649a5241957fb9d2f9a139601c56616fd 100644 (file)
@@ -19,7 +19,7 @@
 
 #include "sha.h"
 
-static int sha3_256_init(struct shash_desc *desc)
+static int s390_sha3_256_init(struct shash_desc *desc)
 {
        struct s390_sha_ctx *sctx = shash_desc_ctx(desc);
 
@@ -79,7 +79,7 @@ static int sha3_224_import(struct shash_desc *desc, const void *in)
 
 static struct shash_alg sha3_256_alg = {
        .digestsize     =       SHA3_256_DIGEST_SIZE,      /* = 32 */
-       .init           =       sha3_256_init,
+       .init           =       s390_sha3_256_init,
        .update         =       s390_sha_update_blocks,
        .finup          =       s390_sha_finup,
        .export         =       sha3_256_export,
@@ -96,18 +96,18 @@ static struct shash_alg sha3_256_alg = {
        }
 };
 
-static int sha3_224_init(struct shash_desc *desc)
+static int s390_sha3_224_init(struct shash_desc *desc)
 {
        struct s390_sha_ctx *sctx = shash_desc_ctx(desc);
 
-       sha3_256_init(desc);
+       s390_sha3_256_init(desc);
        sctx->func = CPACF_KIMD_SHA3_224;
        return 0;
 }
 
 static struct shash_alg sha3_224_alg = {
        .digestsize     =       SHA3_224_DIGEST_SIZE,
-       .init           =       sha3_224_init,
+       .init           =       s390_sha3_224_init,
        .update         =       s390_sha_update_blocks,
        .finup          =       s390_sha_finup,
        .export         =       sha3_256_export, /* same as for 256 */
index a5c9690eecb19a209cd35a2ed7545660e7adebde..ff6ee55844005a87a65f2e17cbf2eb194ca216a5 100644 (file)
@@ -18,7 +18,7 @@
 
 #include "sha.h"
 
-static int sha3_512_init(struct shash_desc *desc)
+static int s390_sha3_512_init(struct shash_desc *desc)
 {
        struct s390_sha_ctx *sctx = shash_desc_ctx(desc);
 
@@ -78,7 +78,7 @@ static int sha3_384_import(struct shash_desc *desc, const void *in)
 
 static struct shash_alg sha3_512_alg = {
        .digestsize     =       SHA3_512_DIGEST_SIZE,
-       .init           =       sha3_512_init,
+       .init           =       s390_sha3_512_init,
        .update         =       s390_sha_update_blocks,
        .finup          =       s390_sha_finup,
        .export         =       sha3_512_export,
@@ -97,18 +97,18 @@ static struct shash_alg sha3_512_alg = {
 
 MODULE_ALIAS_CRYPTO("sha3-512");
 
-static int sha3_384_init(struct shash_desc *desc)
+static int s390_sha3_384_init(struct shash_desc *desc)
 {
        struct s390_sha_ctx *sctx = shash_desc_ctx(desc);
 
-       sha3_512_init(desc);
+       s390_sha3_512_init(desc);
        sctx->func = CPACF_KIMD_SHA3_384;
        return 0;
 }
 
 static struct shash_alg sha3_384_alg = {
        .digestsize     =       SHA3_384_DIGEST_SIZE,
-       .init           =       sha3_384_init,
+       .init           =       s390_sha3_384_init,
        .update         =       s390_sha_update_blocks,
        .finup          =       s390_sha_finup,
        .export         =       sha3_512_export, /* same as for 512 */