original_kernel/arch/arm/crypto
Arnd Bergmann 53cc9baeb9 crypto: arm/sha - fix function cast warnings
clang-16 warns about casting between incompatible function types:

arch/arm/crypto/sha256_glue.c:37:5: error: cast from 'void (*)(u32 *, const void *, unsigned int)' (aka 'void (*)(unsigned int *, const void *, unsigned int)') to 'sha256_block_fn *' (aka 'void (*)(struct sha256_state *, const unsigned char *, int)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
   37 |                                 (sha256_block_fn *)sha256_block_data_order);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm/crypto/sha512-glue.c:34:3: error: cast from 'void (*)(u64 *, const u8 *, int)' (aka 'void (*)(unsigned long long *, const unsigned char *, int)') to 'sha512_block_fn *' (aka 'void (*)(struct sha512_state *, const unsigned char *, int)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
   34 |                 (sha512_block_fn *)sha512_block_data_order);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fix the prototypes for the assembler functions to match the typedef.
The code already relies on the digest being the first part of the
state structure, so there is no change in behavior.

Fixes: c80ae7ca37 ("crypto: arm/sha512 - accelerated SHA-512 using ARM generic ASM and NEON")
Fixes: b59e2ae369 ("crypto: arm/sha256 - move SHA-224/256 ASM/NEON implementation to base layer")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2024-02-24 08:41:19 +08:00
..
.gitignore
Kconfig
Makefile
aes-ce-core.S
aes-ce-glue.c
aes-cipher-core.S
aes-cipher-glue.c
aes-neonbs-core.S
aes-neonbs-glue.c
blake2b-neon-core.S
blake2b-neon-glue.c
blake2s-core.S
blake2s-glue.c
chacha-glue.c
chacha-neon-core.S
chacha-scalar-core.S
crc32-ce-core.S
crc32-ce-glue.c
crct10dif-ce-core.S
crct10dif-ce-glue.c
curve25519-core.S
curve25519-glue.c
ghash-ce-core.S
ghash-ce-glue.c
nh-neon-core.S
nhpoly1305-neon-glue.c
poly1305-armv4.pl
poly1305-glue.c
sha1-armv4-large.S
sha1-armv7-neon.S
sha1-ce-core.S
sha1-ce-glue.c
sha1.h
sha1_glue.c
sha1_neon_glue.c
sha2-ce-core.S
sha2-ce-glue.c
sha256-armv4.pl
sha256_glue.c
sha256_glue.h
sha256_neon_glue.c
sha512-armv4.pl
sha512-glue.c
sha512-neon-glue.c
sha512.h