btrfs-progs: crypto: declare SHA256 x86 optimized implementation

The optimized implementation sha256_process_x86() is not declared
anywhere, this can be caught by -Wmissing-prototypes option.

Just declare it properly in sha.h.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Qu Wenruo 2023-05-03 14:03:41 +08:00 committed by David Sterba
parent 903e93e814
commit 8b826e1cb7
2 changed files with 5 additions and 0 deletions

View File

@ -211,4 +211,7 @@ extern int hmacResult(HMACContext *context,
void sha256_init_accel(void); void sha256_init_accel(void);
/* Export for optimized version to silent -Wmissing-prototypes. */
void sha256_process_x86(uint32_t state[8], const uint8_t data[], uint32_t length);
#endif /* _SHA_H_ */ #endif /* _SHA_H_ */

View File

@ -13,6 +13,8 @@
# include <x86intrin.h> # include <x86intrin.h>
#endif #endif
#include "sha.h"
/* Process multiple blocks. The caller is responsible for setting the initial */ /* Process multiple blocks. The caller is responsible for setting the initial */
/* state, and the caller is responsible for padding the final block. */ /* state, and the caller is responsible for padding the final block. */
void sha256_process_x86(uint32_t state[8], const uint8_t data[], uint32_t length) void sha256_process_x86(uint32_t state[8], const uint8_t data[], uint32_t length)