From: David Howells Date: Sun, 26 Oct 2025 05:50:18 +0000 (-0700) Subject: crypto: s390/sha3 - Rename conflicting functions X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=863ee5a3aa9111da80f87cda1f9d716055f4c11a;p=thirdparty%2Flinux.git crypto: s390/sha3 - Rename conflicting functions 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 Tested-by: Harald Freudenberger Reviewed-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20251026055032.1413733-2-ebiggers@kernel.org Signed-off-by: Eric Biggers --- diff --git a/arch/s390/crypto/sha3_256_s390.c b/arch/s390/crypto/sha3_256_s390.c index 03bb4f4bab701..7415d56649a52 100644 --- a/arch/s390/crypto/sha3_256_s390.c +++ b/arch/s390/crypto/sha3_256_s390.c @@ -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 */ diff --git a/arch/s390/crypto/sha3_512_s390.c b/arch/s390/crypto/sha3_512_s390.c index a5c9690eecb19..ff6ee55844005 100644 --- a/arch/s390/crypto/sha3_512_s390.c +++ b/arch/s390/crypto/sha3_512_s390.c @@ -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 */