Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

crypto: aegis128-neon - add header for internal prototypes

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.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Arnd Bergmann and committed by
Herbert Xu
4e3901fa 48e7fbf6

+19 -11
+17
crypto/aegis-neon.h
··· 1 + // SPDX-License-Identifier: GPL-2.0-or-later 2 + 3 + #ifndef _AEGIS_NEON_H 4 + #define _AEGIS_NEON_H 5 + 6 + void crypto_aegis128_init_neon(void *state, const void *key, const void *iv); 7 + void crypto_aegis128_update_neon(void *state, const void *msg); 8 + void crypto_aegis128_encrypt_chunk_neon(void *state, void *dst, const void *src, 9 + unsigned int size); 10 + void crypto_aegis128_decrypt_chunk_neon(void *state, void *dst, const void *src, 11 + unsigned int size); 12 + int crypto_aegis128_final_neon(void *state, void *tag_xor, 13 + unsigned int assoclen, 14 + unsigned int cryptlen, 15 + unsigned int authsize); 16 + 17 + #endif
+1
crypto/aegis128-neon-inner.c
··· 16 16 #define AEGIS_BLOCK_SIZE 16 17 17 18 18 #include <stddef.h> 19 + #include "aegis-neon.h" 19 20 20 21 extern int aegis128_have_aes_insn; 21 22
+1 -11
crypto/aegis128-neon.c
··· 7 7 #include <asm/neon.h> 8 8 9 9 #include "aegis.h" 10 - 11 - void crypto_aegis128_init_neon(void *state, const void *key, const void *iv); 12 - void crypto_aegis128_update_neon(void *state, const void *msg); 13 - void crypto_aegis128_encrypt_chunk_neon(void *state, void *dst, const void *src, 14 - unsigned int size); 15 - void crypto_aegis128_decrypt_chunk_neon(void *state, void *dst, const void *src, 16 - unsigned int size); 17 - int crypto_aegis128_final_neon(void *state, void *tag_xor, 18 - unsigned int assoclen, 19 - unsigned int cryptlen, 20 - unsigned int authsize); 10 + #include "aegis-neon.h" 21 11 22 12 int aegis128_have_aes_insn __ro_after_init; 23 13