Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <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>

authored by

David Howells and committed by
Eric Biggers
863ee5a3 fa3ca9bf

+10 -10
+5 -5
arch/s390/crypto/sha3_256_s390.c
··· 19 19 20 20 #include "sha.h" 21 21 22 - static int sha3_256_init(struct shash_desc *desc) 22 + static int s390_sha3_256_init(struct shash_desc *desc) 23 23 { 24 24 struct s390_sha_ctx *sctx = shash_desc_ctx(desc); 25 25 ··· 79 79 80 80 static struct shash_alg sha3_256_alg = { 81 81 .digestsize = SHA3_256_DIGEST_SIZE, /* = 32 */ 82 - .init = sha3_256_init, 82 + .init = s390_sha3_256_init, 83 83 .update = s390_sha_update_blocks, 84 84 .finup = s390_sha_finup, 85 85 .export = sha3_256_export, ··· 96 96 } 97 97 }; 98 98 99 - static int sha3_224_init(struct shash_desc *desc) 99 + static int s390_sha3_224_init(struct shash_desc *desc) 100 100 { 101 101 struct s390_sha_ctx *sctx = shash_desc_ctx(desc); 102 102 103 - sha3_256_init(desc); 103 + s390_sha3_256_init(desc); 104 104 sctx->func = CPACF_KIMD_SHA3_224; 105 105 return 0; 106 106 } 107 107 108 108 static struct shash_alg sha3_224_alg = { 109 109 .digestsize = SHA3_224_DIGEST_SIZE, 110 - .init = sha3_224_init, 110 + .init = s390_sha3_224_init, 111 111 .update = s390_sha_update_blocks, 112 112 .finup = s390_sha_finup, 113 113 .export = sha3_256_export, /* same as for 256 */
+5 -5
arch/s390/crypto/sha3_512_s390.c
··· 18 18 19 19 #include "sha.h" 20 20 21 - static int sha3_512_init(struct shash_desc *desc) 21 + static int s390_sha3_512_init(struct shash_desc *desc) 22 22 { 23 23 struct s390_sha_ctx *sctx = shash_desc_ctx(desc); 24 24 ··· 78 78 79 79 static struct shash_alg sha3_512_alg = { 80 80 .digestsize = SHA3_512_DIGEST_SIZE, 81 - .init = sha3_512_init, 81 + .init = s390_sha3_512_init, 82 82 .update = s390_sha_update_blocks, 83 83 .finup = s390_sha_finup, 84 84 .export = sha3_512_export, ··· 97 97 98 98 MODULE_ALIAS_CRYPTO("sha3-512"); 99 99 100 - static int sha3_384_init(struct shash_desc *desc) 100 + static int s390_sha3_384_init(struct shash_desc *desc) 101 101 { 102 102 struct s390_sha_ctx *sctx = shash_desc_ctx(desc); 103 103 104 - sha3_512_init(desc); 104 + s390_sha3_512_init(desc); 105 105 sctx->func = CPACF_KIMD_SHA3_384; 106 106 return 0; 107 107 } 108 108 109 109 static struct shash_alg sha3_384_alg = { 110 110 .digestsize = SHA3_384_DIGEST_SIZE, 111 - .init = sha3_384_init, 111 + .init = s390_sha3_384_init, 112 112 .update = s390_sha_update_blocks, 113 113 .finup = s390_sha_finup, 114 114 .export = sha3_512_export, /* same as for 512 */