linux-stable/arch
Arnd Bergmann 48ff022679 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:18:38 -04:00
..
alpha arch: fix asm-offsets.c building with -Wmissing-prototypes 2024-02-05 20:16:47 +00:00
arc work around gcc bugs with 'asm goto' with outputs 2024-02-23 09:51:20 +01:00
arm crypto: arm/sha - fix function cast warnings 2024-03-26 18:18:38 -04:00
arm64 arm64: dts: qcom: sm8550: Fix SPMI channels size 2024-03-26 18:18:21 -04:00
csky work around gcc bugs with 'asm goto' with outputs 2024-02-23 09:51:20 +01:00
hexagon
loongarch LoongArch: Update cpu_sibling_map when disabling nonboot CPUs 2024-03-01 13:41:45 +01:00
m68k mm: Introduce flush_cache_vmap_early() 2024-02-16 19:14:25 +01:00
microblaze
mips MIPS: Clear Cause.BD in instruction_pointer_set 2024-03-26 18:17:50 -04:00
nios2 mm: Introduce flush_cache_vmap_early() 2024-02-16 19:14:25 +01:00
openrisc
parisc parisc/ftrace: add missing CONFIG_DYNAMIC_FTRACE check 2024-03-26 18:17:52 -04:00
powerpc powerpc: Force inlining of arch_vmap_p{u/m}d_supported() 2024-03-26 18:18:34 -04:00
riscv riscv: dts: sifive: add missing #interrupt-cells to pmic 2024-03-26 18:17:52 -04:00
s390 s390/cache: prevent rebuild of shared_cpu_list 2024-03-26 18:18:24 -04:00
sh mm: Introduce flush_cache_vmap_early() 2024-02-16 19:14:25 +01:00
sparc sparc: Fix undefined reference to fb_is_primary_device 2024-03-01 13:41:47 +01:00
um um: Fix adding '-no-pie' for clang 2024-02-23 09:51:39 +01:00
x86 ACPI: CPPC: enable AMD CPPC V2 support for family 17h processors 2024-03-26 18:18:22 -04:00
xtensa work around gcc bugs with 'asm goto' with outputs 2024-02-23 09:51:20 +01:00
.gitignore
Kconfig scs: add CONFIG_MMU dependency for vfree_atomic() 2024-02-23 09:51:28 +01:00