From 903e93e814f43fb93c07fded10f05b9ccbc483a6 Mon Sep 17 00:00:00 2001 From: Qu Wenruo Date: Wed, 3 May 2023 14:03:40 +0800 Subject: [PATCH] btrfs-progs: crypto: move optimized declarations to blake2b.h This is to avoid -Wmissing-prototypes warnings. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba --- crypto/blake2.h | 5 +++++ crypto/blake2b-ref.c | 4 ---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/crypto/blake2.h b/crypto/blake2.h index cd89adb6..052afe34 100644 --- a/crypto/blake2.h +++ b/crypto/blake2.h @@ -92,6 +92,11 @@ extern "C" { void blake2_init_accel(void); + /* Export optimized versions to silent -Wmissing-prototypes warnings. */ + void blake2b_compress_avx2( blake2b_state *S, const uint8_t block[BLAKE2B_BLOCKBYTES] ); + void blake2b_compress_sse2( blake2b_state *S, const uint8_t block[BLAKE2B_BLOCKBYTES] ); + void blake2b_compress_sse41( blake2b_state *S, const uint8_t block[BLAKE2B_BLOCKBYTES] ); + #if defined(__cplusplus) } #endif diff --git a/crypto/blake2b-ref.c b/crypto/blake2b-ref.c index c47c92ad..7b2e410a 100644 --- a/crypto/blake2b-ref.c +++ b/crypto/blake2b-ref.c @@ -220,10 +220,6 @@ static void blake2b_compress_ref( blake2b_state *S, const uint8_t block[BLAKE2B_ #undef G #undef ROUND -void blake2b_compress_sse2( blake2b_state *S, const uint8_t block[BLAKE2B_BLOCKBYTES] ); -void blake2b_compress_sse41( blake2b_state *S, const uint8_t block[BLAKE2B_BLOCKBYTES] ); -void blake2b_compress_avx2( blake2b_state *S, const uint8_t block[BLAKE2B_BLOCKBYTES] ); - static void (*blake2b_compress)( blake2b_state *S, const uint8_t block[BLAKE2B_BLOCKBYTES] ) = blake2b_compress_ref; void blake2_init_accel(void)