diff mbox series

[11/12] wireguard: Do not include crypto/algapi.h

Message ID E1qYlAB-006vJI-Cv@formenos.hmeau.com (mailing list archive)
State Awaiting Upstream
Delegated to: Netdev Maintainers
Headers show
Series Do not include crypto/algapi.h | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Guessed tree name to be net-next, async
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit fail Errors and warnings before: 16 this patch: 16
netdev/cc_maintainers warning 4 maintainers not CCed: kuba@kernel.org edumazet@google.com pabeni@redhat.com wireguard@lists.zx2c4.com
netdev/build_clang fail Errors and warnings before: 66 this patch: 66
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn fail Errors and warnings before: 16 this patch: 16
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 34 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Herbert Xu Aug. 23, 2023, 10:32 a.m. UTC
The header file crypto/algapi.h is for internal use only.  Use the
header file crypto/utils.h instead.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
---

 drivers/net/wireguard/cookie.c  |    2 +-
 drivers/net/wireguard/netlink.c |    2 +-
 drivers/net/wireguard/noise.c   |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

Comments

Jason A. Donenfeld Aug. 23, 2023, 11:48 a.m. UTC | #1
On Wed, Aug 23, 2023 at 12:33 PM Herbert Xu <herbert@gondor.apana.org.au> wrote:
>
> The header file crypto/algapi.h is for internal use only.  Use the
> header file crypto/utils.h instead.
>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
> ---
>
>  drivers/net/wireguard/cookie.c  |    2 +-
>  drivers/net/wireguard/netlink.c |    2 +-
>  drivers/net/wireguard/noise.c   |    2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/wireguard/cookie.c b/drivers/net/wireguard/cookie.c
> index 4956f0499c19..f89581b5e8cb 100644
> --- a/drivers/net/wireguard/cookie.c
> +++ b/drivers/net/wireguard/cookie.c
> @@ -12,9 +12,9 @@
>
>  #include <crypto/blake2s.h>
>  #include <crypto/chacha20poly1305.h>
> +#include <crypto/utils.h>
>
>  #include <net/ipv6.h>
> -#include <crypto/algapi.h>
>
>  void wg_cookie_checker_init(struct cookie_checker *checker,
>                             struct wg_device *wg)
> diff --git a/drivers/net/wireguard/netlink.c b/drivers/net/wireguard/netlink.c
> index 6d1bd9f52d02..0a1502100e8b 100644
> --- a/drivers/net/wireguard/netlink.c
> +++ b/drivers/net/wireguard/netlink.c
> @@ -12,10 +12,10 @@
>
>  #include <uapi/linux/wireguard.h>
>
> +#include <crypto/utils.h>
>  #include <linux/if.h>
>  #include <net/genetlink.h>
>  #include <net/sock.h>
> -#include <crypto/algapi.h>
>
>  static struct genl_family genl_family;
>
> diff --git a/drivers/net/wireguard/noise.c b/drivers/net/wireguard/noise.c
> index 720952b92e78..e7ad81ca4a36 100644
> --- a/drivers/net/wireguard/noise.c
> +++ b/drivers/net/wireguard/noise.c
> @@ -10,12 +10,12 @@
>  #include "queueing.h"
>  #include "peerlookup.h"
>
> +#include <crypto/utils.h>
>  #include <linux/rcupdate.h>
>  #include <linux/slab.h>
>  #include <linux/bitmap.h>
>  #include <linux/scatterlist.h>
>  #include <linux/highmem.h>
> -#include <crypto/algapi.h>
>
>  /* This implements Noise_IKpsk2:
>   *

Small nit - with the exception of the cookie.c reordering, could you
maintain the existing #include ordering of the other files? No need to
send a v2 for that if you don't want. And please make the entire
commit subject lowercase. With those done,

Acked-by: Jason A. Donenfeld <Jason@zx2c4.com>

As a side note, you may want to eventually do something to make sure
people don't add back algapi.h, like move it to internal/ or out of
include/ all together. I figure you've already thought about this, and
this series is just the first step.

Jason
diff mbox series

Patch

diff --git a/drivers/net/wireguard/cookie.c b/drivers/net/wireguard/cookie.c
index 4956f0499c19..f89581b5e8cb 100644
--- a/drivers/net/wireguard/cookie.c
+++ b/drivers/net/wireguard/cookie.c
@@ -12,9 +12,9 @@ 
 
 #include <crypto/blake2s.h>
 #include <crypto/chacha20poly1305.h>
+#include <crypto/utils.h>
 
 #include <net/ipv6.h>
-#include <crypto/algapi.h>
 
 void wg_cookie_checker_init(struct cookie_checker *checker,
 			    struct wg_device *wg)
diff --git a/drivers/net/wireguard/netlink.c b/drivers/net/wireguard/netlink.c
index 6d1bd9f52d02..0a1502100e8b 100644
--- a/drivers/net/wireguard/netlink.c
+++ b/drivers/net/wireguard/netlink.c
@@ -12,10 +12,10 @@ 
 
 #include <uapi/linux/wireguard.h>
 
+#include <crypto/utils.h>
 #include <linux/if.h>
 #include <net/genetlink.h>
 #include <net/sock.h>
-#include <crypto/algapi.h>
 
 static struct genl_family genl_family;
 
diff --git a/drivers/net/wireguard/noise.c b/drivers/net/wireguard/noise.c
index 720952b92e78..e7ad81ca4a36 100644
--- a/drivers/net/wireguard/noise.c
+++ b/drivers/net/wireguard/noise.c
@@ -10,12 +10,12 @@ 
 #include "queueing.h"
 #include "peerlookup.h"
 
+#include <crypto/utils.h>
 #include <linux/rcupdate.h>
 #include <linux/slab.h>
 #include <linux/bitmap.h>
 #include <linux/scatterlist.h>
 #include <linux/highmem.h>
-#include <crypto/algapi.h>
 
 /* This implements Noise_IKpsk2:
  *