diff mbox series

[v2,4/7] btrfs-progs: crypto/blake2: move optimized declarations to blake2b.h

Message ID f11f57fcdd4a5ee32218cee0dae82f97baf0cfc5.1683093416.git.wqu@suse.com (mailing list archive)
State New, archived
Headers show
Series btrfs-progs: fix -Wmissing-prototypes warnings and enable that warning option | expand

Commit Message

Qu Wenruo May 3, 2023, 6:03 a.m. UTC
This is to avoid -Wmissing-prototypes warnings.

Signed-off-by: Qu Wenruo <wqu@suse.com>
---
 crypto/blake2.h      | 5 +++++
 crypto/blake2b-ref.c | 4 ----
 2 files changed, 5 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/crypto/blake2.h b/crypto/blake2.h
index cd89adb65a9b..052afe34a651 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 f28dce3ae2a8..489af399f945 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)