linux-stable/arch/arm/crypto
Arnd Bergmann 7baf1151c3 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:19:51 -04:00
..
.gitignore SPDX patches for 5.7-rc1. 2020-04-03 13:12:26 -07:00
aes-ce-core.S crypto: arm/aes-ce - work around Cortex-A57/A72 silion errata 2020-12-04 18:13:14 +11:00
aes-ce-glue.c
aes-cipher-core.S crypto: arm/aes-scalar - switch to common rev_l/mov_l macros 2021-03-19 21:59:46 +11:00
aes-cipher-glue.c crypto: Prepare to move crypto_tfm_ctx 2022-12-02 18:12:40 +08:00
aes-neonbs-core.S crypto: arm/aes-neonbs-ctr - deal with non-multiples of AES block size 2022-02-05 15:10:51 +11:00
aes-neonbs-glue.c crypto: arm/aes-neonbs-ctr - deal with non-multiples of AES block size 2022-02-05 15:10:51 +11:00
blake2b-neon-core.S crypto: arm/blake2b - add NEON-accelerated BLAKE2b 2021-01-03 08:41:39 +11:00
blake2b-neon-glue.c crypto: arm/blake2b - drop unnecessary return statement 2021-03-07 15:13:14 +11:00
blake2s-core.S lib/crypto: blake2s: include as built-in 2022-01-07 00:25:25 +01:00
blake2s-glue.c lib/crypto: blake2s: include as built-in 2022-01-07 00:25:25 +01:00
chacha-glue.c crypto: arm/chacha-neon - add missing counter increment 2021-01-03 08:35:35 +11:00
chacha-neon-core.S crypto: arm/chacha-neon - optimize for non-block size multiples 2020-11-13 20:38:44 +11:00
chacha-scalar-core.S crypto: arm/chacha-scalar - switch to common rev_l macro 2021-03-19 21:59:46 +11:00
crc32-ce-core.S crypto: Replace HTTP links with HTTPS ones 2020-07-23 17:34:20 +10:00
crc32-ce-glue.c
crct10dif-ce-core.S
crct10dif-ce-glue.c
curve25519-core.S crypto: arm/curve25519 - Move '.fpu' after '.arch' 2021-04-16 21:16:34 +10:00
curve25519-glue.c crypto: arm/curve25519 - rename 'mod_init' & 'mod_exit' functions to be module-specific 2021-07-16 15:49:35 +08:00
ghash-ce-core.S ARM: 9286/1: crypto: Implement fused AES-CTR/GHASH version of GCM 2023-01-18 15:04:51 +00:00
ghash-ce-glue.c ARM: 9286/1: crypto: Implement fused AES-CTR/GHASH version of GCM 2023-01-18 15:04:51 +00:00
Kconfig ARM: 9286/1: crypto: Implement fused AES-CTR/GHASH version of GCM 2023-01-18 15:04:51 +00:00
Makefile ARM: 9287/1: Reduce __thumb2__ definition to crypto files that require it 2023-01-23 14:31:18 +00:00
nh-neon-core.S crypto: arm/nhpoly1305 - eliminate unnecessary CFI wrapper 2022-11-25 17:39:19 +08:00
nhpoly1305-neon-glue.c crypto: arm/nhpoly1305 - eliminate unnecessary CFI wrapper 2022-11-25 17:39:19 +08:00
poly1305-armv4.pl
poly1305-glue.c crypto: poly1305 - fix poly1305_core_setkey() declaration 2021-04-02 18:28:12 +11:00
sha1-armv4-large.S crypto: Replace HTTP links with HTTPS ones 2020-07-23 17:34:20 +10:00
sha1-armv7-neon.S
sha1-ce-core.S
sha1-ce-glue.c crypto: sha - split sha.h into sha1.h and sha2.h 2020-11-20 14:45:33 +11:00
sha1.h crypto: sha - split sha.h into sha1.h and sha2.h 2020-11-20 14:45:33 +11:00
sha1_glue.c crypto: arm/sha1 - Fix clang function cast warnings 2022-12-30 22:56:27 +08:00
sha1_neon_glue.c crypto: arm/sha1-neon - Fix clang function cast warnings 2023-05-12 18:48:01 +08:00
sha2-ce-core.S
sha2-ce-glue.c crypto: sha - split sha.h into sha1.h and sha2.h 2020-11-20 14:45:33 +11:00
sha256-armv4.pl crypto: arm/sha256-neon - avoid ADRL pseudo instruction 2020-09-25 17:48:13 +10:00
sha256_glue.c crypto: arm/sha - fix function cast warnings 2024-03-26 18:19:51 -04:00
sha256_glue.h
sha256_neon_glue.c crypto: arm/sha256-neon - Fix clang function cast warnings 2023-05-12 18:48:01 +08:00
sha512-armv4.pl crypto: arm/sha512-neon - avoid ADRL pseudo instruction 2020-09-25 17:48:14 +10:00
sha512-glue.c crypto: arm/sha - fix function cast warnings 2024-03-26 18:19:51 -04:00
sha512-neon-glue.c crypto: arm/sha512-neon - Fix clang function cast warnings 2023-05-12 18:48:01 +08:00
sha512.h