crypto: aegis: add header for internal prototypes
PATCH 1/1 crypto: aegis: add header for internal prototypes
From: Arnd Bergmann <[email protected]>
gcc warns if prototypes are only visible to the caller but not the callee:
crypto/aegis128-neon-inner.c:134:6: warning: no previous prototype for 'crypto_aegis128_init_neon' [-Wmissing-prototypes] crypto/aegis128-neon-inner.c:164:6: warning: no previous prototype for 'crypto_aegis128_update_neon' [-Wmissing-prototypes] crypto/aegis128-neon-inner.c:221:6: warning: no previous prototype for 'crypto_aegis128_encrypt_chunk_neon' [-Wmissing-prototypes] crypto/aegis128-neon-inner.c:270:6: warning: no previous prototype for 'crypto_aegis128_decrypt_chunk_neon' [-Wmissing-prototypes] crypto/aegis128-neon-inner.c:316:5: warning: no previous prototype for 'crypto_aegis128_final_neon' [-Wmissing-prototypes]
The prototypes cannot be in the regular aegis.h, as the inner neon code cannot include normal kernel headers. Instead add a new header just for the functions provided by this file.
--- crypto/aegis-neon.h | 17 +++++++++++++++++ crypto/aegis128-neon-inner.c | 1 + crypto/aegis128-neon.c | 12 +----------- 3 files changed, 19 insertions(+), 11 deletions(-) create mode 100644 crypto/aegis-neon.h
crypto/aegis-neon.h new file +17 -0
@@ -0,0 +1,17 @@ +// SPDX-License-Identifier: GPL-2.0-or-later + +#ifndef _AEGIS_NEON_H +#define _AEGIS_NEON_H + +void crypto_aegis128_init_neon (void *state,const void *key,const void *iv); +void crypto_aegis128_update_neon (void *state,const void *msg); +void crypto_aegis128_encrypt_chunk_neon (void *state,void *dst,const void *src, +unsigned int size); +void crypto_aegis128_decrypt_chunk_neon (void *state,void *dst,const void *src, +unsigned int size); +int crypto_aegis128_final_neon (void *state,void *tag_xor, +unsigned int assoclen, +unsigned int cryptlen, +unsigned int authsize); + +#endif
crypto/aegis128-neon-inner.c +1 -0
@@ -16,6 +16,7 @@#define AEGIS_BLOCK_SIZE 16#include <stddef.h> +#include "aegis-neon.h" extern int aegis128_have_aes_insn;
crypto/aegis128-neon.c +1 -11
@@ -7,17 +7,7 @@#include <asm/neon.h> #include "aegis.h" - -void crypto_aegis128_init_neon (void *state,const void *key,const void *iv); -void crypto_aegis128_update_neon (void *state,const void *msg); -void crypto_aegis128_encrypt_chunk_neon (void *state,void *dst,const void *src, -unsigned int size); -void crypto_aegis128_decrypt_chunk_neon (void *state,void *dst,const void *src, -unsigned int size); -int crypto_aegis128_final_neon (void *state,void *tag_xor, -unsigned int assoclen, -unsigned int cryptlen, -unsigned int authsize); +#include "aegis-neon.h" int aegis128_have_aes_insn__ro_after_init ;
Signature · 1 line
2.39.2
Herbert Xu
maintainerQuoted 15 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
gcc warns if prototypes are only visible to the caller but not the callee:
crypto/aegis128-neon-inner.c:134:6: warning: no previous prototype for 'crypto_aegis128_init_neon' [-Wmissing-prototypes]crypto/aegis128-neon-inner.c:164:6: warning: no previous prototype for 'crypto_aegis128_update_neon' [-Wmissing-prototypes]crypto/aegis128-neon-inner.c:221:6: warning: no previous prototype for 'crypto_aegis128_encrypt_chunk_neon' [-Wmissing-prototypes]crypto/aegis128-neon-inner.c:270:6: warning: no previous prototype for 'crypto_aegis128_decrypt_chunk_neon' [-Wmissing-prototypes]crypto/aegis128-neon-inner.c:316:5: warning: no previous prototype for 'crypto_aegis128_final_neon' [-Wmissing-prototypes]The prototypes cannot be in the regular
aegis.h, as the inner neon code cannot include normal kernel headers. Instead add a new header just for the functions provided by this file.
Quoted 7 lines
Signed-off-by Arnd Bergmann <[email protected]>--- crypto/aegis-neon.h | 17 +++++++++++++++++ crypto/aegis128-neon-inner.c | 1 + crypto/aegis128-neon.c | 12 +----------- 3 files changed, 19 insertions(+), 11 deletions(-) create mode 100644 crypto/aegis-neon.h
Patch applied. Thanks.
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt