kernel: 5.4: import wireguard backport
[openwrt/openwrt.git] / target / linux / generic / backport-5.4 / 080-wireguard-0061-crypto-arm-curve25519-include-linux-scatterlist.h.patch
1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Fabio Estevam <festevam@gmail.com>
3 Date: Mon, 24 Aug 2020 11:09:53 -0300
4 Subject: [PATCH] crypto: arm/curve25519 - include <linux/scatterlist.h>
5
6 commit 6779d0e6b0fe193ab3010ea201782ca6f75a3862 upstream.
7
8 Building ARM allmodconfig leads to the following warnings:
9
10 arch/arm/crypto/curve25519-glue.c:73:12: error: implicit declaration of function 'sg_copy_to_buffer' [-Werror=implicit-function-declaration]
11 arch/arm/crypto/curve25519-glue.c:74:9: error: implicit declaration of function 'sg_nents_for_len' [-Werror=implicit-function-declaration]
12 arch/arm/crypto/curve25519-glue.c:88:11: error: implicit declaration of function 'sg_copy_from_buffer' [-Werror=implicit-function-declaration]
13
14 Include <linux/scatterlist.h> to fix such warnings
15
16 Reported-by: Olof's autobuilder <build@lixom.net>
17 Fixes: 0c3dc787a62a ("crypto: algapi - Remove skbuff.h inclusion")
18 Signed-off-by: Fabio Estevam <festevam@gmail.com>
19 Acked-by: Ard Biesheuvel <ardb@kernel.org>
20 Acked-by: Jason A. Donenfeld <Jason@zx2c4.com>
21 Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
22 Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
23 ---
24 arch/arm/crypto/curve25519-glue.c | 1 +
25 1 file changed, 1 insertion(+)
26
27 --- a/arch/arm/crypto/curve25519-glue.c
28 +++ b/arch/arm/crypto/curve25519-glue.c
29 @@ -16,6 +16,7 @@
30 #include <linux/module.h>
31 #include <linux/init.h>
32 #include <linux/jump_label.h>
33 +#include <linux/scatterlist.h>
34 #include <crypto/curve25519.h>
35
36 asmlinkage void curve25519_neon(u8 mypublic[CURVE25519_KEY_SIZE],