linux-stable/arch/arm/crypto
Arnd Bergmann 8d27d1b155 crypto: arm/sha - fix function cast warnings
[ Upstream commit 53cc9baeb9 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-26 18:22:40 -04:00
..
.gitignore
aes-ce-core.S
aes-ce-glue.c crypto: algapi - make crypto_xor() take separate dst and src arguments 2017-08-04 09:27:15 +08:00
aes-cipher-core.S crypto: arm/aes-cipher - move S-box to .rodata section 2018-02-22 22:16:19 +08:00
aes-cipher-glue.c
aes-neonbs-core.S
aes-neonbs-glue.c crypto: arm/aes-neonbs - don't access already-freed walk.iv 2019-05-22 07:37:37 +02:00
chacha20-neon-core.S crypto: arm/chacha20 - always use vrev for 16-bit rotates 2018-08-03 18:06:05 +08:00
chacha20-neon-glue.c
crc32-ce-core.S crypto: arm/crc32 - fix build error with outdated binutils 2017-03-01 19:47:51 +08:00
crc32-ce-glue.c crypto: arm/crc32 - avoid warning when compiling with Clang 2019-11-20 18:47:11 +01:00
crct10dif-ce-core.S crypto: arm/crct10dif - revert to C code for short inputs 2019-03-23 20:09:54 +01:00
crct10dif-ce-glue.c crypto: arm/crct10dif - revert to C code for short inputs 2019-03-23 20:09:54 +01:00
ghash-ce-core.S crypto: arm/ghash - add NEON accelerated fallback for vmull.p64 2017-08-04 09:27:24 +08:00
ghash-ce-glue.c crypto: ahash - remove useless setting of cra_type 2018-07-09 00:30:26 +08:00
Kconfig crypto: speck - remove Speck 2018-11-13 11:08:46 -08:00
Makefile crypto: speck - remove Speck 2018-11-13 11:08:46 -08:00
sha1-armv4-large.S crypto: clarify licensing of OpenSSL asm code 2018-05-31 00:13:44 +08:00
sha1-armv7-neon.S
sha1-ce-core.S
sha1-ce-glue.c crypto: shash - remove useless setting of type flags 2018-07-09 00:30:24 +08:00
sha1.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sha1_glue.c crypto: shash - remove useless setting of type flags 2018-07-09 00:30:24 +08:00
sha1_neon_glue.c crypto: shash - remove useless setting of type flags 2018-07-09 00:30:24 +08:00
sha2-ce-core.S
sha2-ce-glue.c crypto: shash - remove useless setting of type flags 2018-07-09 00:30:24 +08:00
sha256-armv4.pl crypto: sha256/arm - fix crash bug in Thumb2 build 2019-04-20 09:16:03 +02:00
sha256-core.S_shipped crypto: sha256/arm - fix crash bug in Thumb2 build 2019-04-20 09:16:03 +02:00
sha256_glue.c crypto: arm/sha - fix function cast warnings 2024-03-26 18:22:40 -04:00
sha256_glue.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sha256_neon_glue.c crypto: arm - Rename functions to avoid conflict with crypto/sha256.h 2024-03-26 18:22:40 -04:00
sha512-armv4.pl crypto: sha512/arm - fix crash bug in Thumb2 build 2019-04-20 09:16:03 +02:00
sha512-core.S_shipped crypto: sha512/arm - fix crash bug in Thumb2 build 2019-04-20 09:16:03 +02:00
sha512-glue.c crypto: arm/sha - fix function cast warnings 2024-03-26 18:22:40 -04:00
sha512-neon-glue.c crypto: shash - remove useless setting of type flags 2018-07-09 00:30:24 +08:00
sha512.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00