]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
lib/crypto: Include <crypto/utils.h> instead of <crypto/algapi.h>
authorEric Biggers <ebiggers@kernel.org>
Tue, 31 Mar 2026 02:44:38 +0000 (19:44 -0700)
committerEric Biggers <ebiggers@kernel.org>
Wed, 1 Apr 2026 00:19:31 +0000 (17:19 -0700)
Since the lib/crypto/ files that include <crypto/algapi.h> need it only
for the transitive inclusion of <crypto/utils.h> (and not all the
traditional crypto API stuff that the rest of <crypto/algapi.h> is
filled with), replace these inclusions with direct inclusions of
<crypto/utils.h>.

Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20260331024438.51783-1-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
lib/crypto/aescfb.c
lib/crypto/chacha.c
lib/crypto/memneq.c

index e38848d101e33005af643e25e1f8e29d0ba8f98c..82cd554360556580ca02fe1594b04779d67c4949 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #include <crypto/aes.h>
-#include <crypto/algapi.h>
+#include <crypto/utils.h>
 #include <linux/export.h>
 #include <linux/module.h>
 
index e0c7cb4af31800006034b68cd2713b1ee0b0fa2c..86e5d382a4e0cbbba353ea21a435875da4ba6b3b 100644 (file)
@@ -5,8 +5,8 @@
  * Copyright (C) 2015 Martin Willi
  */
 
-#include <crypto/algapi.h> // for crypto_xor_cpy
 #include <crypto/chacha.h>
+#include <crypto/utils.h>
 #include <linux/export.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
index 44daacb8cb5130c5e8a8db55103487b6475c9337..08924acd44bc4722721cc7547bb7e4c4496b4ffb 100644 (file)
@@ -59,7 +59,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <crypto/algapi.h>
+#include <crypto/utils.h>
 #include <linux/export.h>
 #include <linux/module.h>
 #include <linux/unaligned.h>
@@ -159,7 +159,7 @@ static inline unsigned long __crypto_memneq_16(const void *a, const void *b)
 /* Compare two areas of memory without leaking timing information,
  * and with special optimizations for common sizes.  Users should
  * not call this function directly, but should instead use
- * crypto_memneq defined in crypto/algapi.h.
+ * crypto_memneq defined in crypto/utils.h.
  */
 noinline unsigned long __crypto_memneq(const void *a, const void *b,
                                       size_t size)