mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-16 03:11:11 -04:00
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>
This commit is contained in:
committed by
Eric Biggers
parent
fa3ca9bfe3
commit
863ee5a3aa
@@ -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 */
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user