Skip to content

Commit

Permalink
crypto: lib/curve25519 - Move selftest prototype into header file
Browse files Browse the repository at this point in the history
This patch moves the curve25519_selftest into curve25519.h so
we don't get a warning from gcc complaining about a missing
prototype.

Reported-by: kernel test robot <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
herbertx committed Nov 20, 2020
1 parent a24d22b commit 1201581
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 2 additions & 0 deletions include/crypto/curve25519.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ void curve25519_arch(u8 out[CURVE25519_KEY_SIZE],
void curve25519_base_arch(u8 pub[CURVE25519_KEY_SIZE],
const u8 secret[CURVE25519_KEY_SIZE]);

bool curve25519_selftest(void);

static inline
bool __must_check curve25519(u8 mypublic[CURVE25519_KEY_SIZE],
const u8 secret[CURVE25519_KEY_SIZE],
Expand Down
2 changes: 0 additions & 2 deletions lib/crypto/curve25519.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
#include <linux/module.h>
#include <linux/init.h>

bool curve25519_selftest(void);

static int __init mod_init(void)
{
if (!IS_ENABLED(CONFIG_CRYPTO_MANAGER_DISABLE_TESTS) &&
Expand Down

0 comments on commit 1201581

Please sign in to comment.