diff mbox series

crypto: arm/curve25519 - include <linux/scatterlist.h>

Message ID 20200824140953.5964-1-festevam@gmail.com (mailing list archive)
State Accepted
Headers show
Series crypto: arm/curve25519 - include <linux/scatterlist.h> | expand

Commit Message

Fabio Estevam Aug. 24, 2020, 2:09 p.m. UTC
Building ARM allmodconfig leads to the following warnings:

arch/arm/crypto/curve25519-glue.c:73:12: error: implicit declaration of function 'sg_copy_to_buffer' [-Werror=implicit-function-declaration]
arch/arm/crypto/curve25519-glue.c:74:9: error: implicit declaration of function 'sg_nents_for_len' [-Werror=implicit-function-declaration]
arch/arm/crypto/curve25519-glue.c:88:11: error: implicit declaration of function 'sg_copy_from_buffer' [-Werror=implicit-function-declaration]

Include <linux/scatterlist.h> to fix such warnings

Reported-by: Olof's autobuilder <build@lixom.net>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
 arch/arm/crypto/curve25519-glue.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Ard Biesheuvel Aug. 24, 2020, 3:11 p.m. UTC | #1
On Mon, 24 Aug 2020 at 16:13, Fabio Estevam <festevam@gmail.com> wrote:
>
> Building ARM allmodconfig leads to the following warnings:
>
> arch/arm/crypto/curve25519-glue.c:73:12: error: implicit declaration of function 'sg_copy_to_buffer' [-Werror=implicit-function-declaration]
> arch/arm/crypto/curve25519-glue.c:74:9: error: implicit declaration of function 'sg_nents_for_len' [-Werror=implicit-function-declaration]
> arch/arm/crypto/curve25519-glue.c:88:11: error: implicit declaration of function 'sg_copy_from_buffer' [-Werror=implicit-function-declaration]
>
> Include <linux/scatterlist.h> to fix such warnings
>
> Reported-by: Olof's autobuilder <build@lixom.net>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>

Thanks for the fix - I just hit this as well.

Acked-by: Ard Biesheuvel <ardb@kernel.org>

> ---
>  arch/arm/crypto/curve25519-glue.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm/crypto/curve25519-glue.c b/arch/arm/crypto/curve25519-glue.c
> index 776ae07e0469..31eb75b6002f 100644
> --- a/arch/arm/crypto/curve25519-glue.c
> +++ b/arch/arm/crypto/curve25519-glue.c
> @@ -16,6 +16,7 @@
>  #include <linux/module.h>
>  #include <linux/init.h>
>  #include <linux/jump_label.h>
> +#include <linux/scatterlist.h>
>  #include <crypto/curve25519.h>
>
>  asmlinkage void curve25519_neon(u8 mypublic[CURVE25519_KEY_SIZE],
> --
> 2.17.1
>
Jason A. Donenfeld Aug. 24, 2020, 7:42 p.m. UTC | #2
On Mon, Aug 24, 2020 at 4:13 PM Fabio Estevam <festevam@gmail.com> wrote:
>
> Building ARM allmodconfig leads to the following warnings:
>
> arch/arm/crypto/curve25519-glue.c:73:12: error: implicit declaration of function 'sg_copy_to_buffer' [-Werror=implicit-function-declaration]
> arch/arm/crypto/curve25519-glue.c:74:9: error: implicit declaration of function 'sg_nents_for_len' [-Werror=implicit-function-declaration]
> arch/arm/crypto/curve25519-glue.c:88:11: error: implicit declaration of function 'sg_copy_from_buffer' [-Werror=implicit-function-declaration]
>
> Include <linux/scatterlist.h> to fix such warnings

This patch seems correct to me -- sg_copy_to_buffer, sg_nents_for_len.
I wonder what header dependency chain caused us to miss this before.
Either way,

Acked-by: Jason A. Donenfeld <Jason@zx2c4.com>
Herbert Xu Aug. 25, 2020, 1:53 a.m. UTC | #3
On Mon, Aug 24, 2020 at 11:09:53AM -0300, Fabio Estevam wrote:
> Building ARM allmodconfig leads to the following warnings:
> 
> arch/arm/crypto/curve25519-glue.c:73:12: error: implicit declaration of function 'sg_copy_to_buffer' [-Werror=implicit-function-declaration]
> arch/arm/crypto/curve25519-glue.c:74:9: error: implicit declaration of function 'sg_nents_for_len' [-Werror=implicit-function-declaration]
> arch/arm/crypto/curve25519-glue.c:88:11: error: implicit declaration of function 'sg_copy_from_buffer' [-Werror=implicit-function-declaration]
> 
> Include <linux/scatterlist.h> to fix such warnings
> 
> Reported-by: Olof's autobuilder <build@lixom.net>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> ---
>  arch/arm/crypto/curve25519-glue.c | 1 +
>  1 file changed, 1 insertion(+)

Patch applied.  Thanks.
diff mbox series

Patch

diff --git a/arch/arm/crypto/curve25519-glue.c b/arch/arm/crypto/curve25519-glue.c
index 776ae07e0469..31eb75b6002f 100644
--- a/arch/arm/crypto/curve25519-glue.c
+++ b/arch/arm/crypto/curve25519-glue.c
@@ -16,6 +16,7 @@ 
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/jump_label.h>
+#include <linux/scatterlist.h>
 #include <crypto/curve25519.h>
 
 asmlinkage void curve25519_neon(u8 mypublic[CURVE25519_KEY_SIZE],