diff mbox series

[v2] wireguard: do not include crypto/algapi.h

Message ID ZObn+Xmyo47wsLGV@gondor.apana.org.au
State Accepted
Commit d90dde8c550f6fcf8856b3c88226d774b038bf89
Headers show
Series [v2] wireguard: do not include crypto/algapi.h | expand

Commit Message

Herbert Xu Aug. 24, 2023, 5:17 a.m. UTC
On Wed, Aug 23, 2023 at 01:48:47PM +0200, Jason A. Donenfeld wrote:
>
> 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>

Thanks.  As these patches are independent of each other, I'll just
repost this one patch and delete it from the original series.

> 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.

Sure that is the idea.  Although judging from the result of my
grep, it seems most of the external users are due to the utility
functions which hopefully won't be an issue anymore because of the
new crypto/utils.h file.

---8<---
The header file crypto/algapi.h is for internal use only.  Use the
header file crypto/utils.h instead.

Acked-by: Jason A. Donenfeld <Jason@zx2c4.com>
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 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..0a2f225e754a 100644
--- a/drivers/net/wireguard/netlink.c
+++ b/drivers/net/wireguard/netlink.c
@@ -15,7 +15,7 @@ 
 #include <linux/if.h>
 #include <net/genetlink.h>
 #include <net/sock.h>
-#include <crypto/algapi.h>
+#include <crypto/utils.h>
 
 static struct genl_family genl_family;
 
diff --git a/drivers/net/wireguard/noise.c b/drivers/net/wireguard/noise.c
index 720952b92e78..202a33af5a72 100644
--- a/drivers/net/wireguard/noise.c
+++ b/drivers/net/wireguard/noise.c
@@ -15,7 +15,7 @@ 
 #include <linux/bitmap.h>
 #include <linux/scatterlist.h>
 #include <linux/highmem.h>
-#include <crypto/algapi.h>
+#include <crypto/utils.h>
 
 /* This implements Noise_IKpsk2:
  *