summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@kernel.org>2026-03-31 05:44:38 +0300
committerEric Biggers <ebiggers@kernel.org>2026-04-01 03:19:31 +0300
commit8aeeb5255d5e0001f2af6786e2a7564fef416acf (patch)
tree66d8b23c5fec17366a0ad831e04eaa7308c62869
parent8f45af945fce60c8656b5113d80af7fe221c88f5 (diff)
downloadlinux-8aeeb5255d5e0001f2af6786e2a7564fef416acf.tar.xz
lib/crypto: Include <crypto/utils.h> instead of <crypto/algapi.h>
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>
-rw-r--r--lib/crypto/aescfb.c2
-rw-r--r--lib/crypto/chacha.c2
-rw-r--r--lib/crypto/memneq.c4
3 files changed, 4 insertions, 4 deletions
diff --git a/lib/crypto/aescfb.c b/lib/crypto/aescfb.c
index e38848d101e3..82cd55436055 100644
--- a/lib/crypto/aescfb.c
+++ b/lib/crypto/aescfb.c
@@ -6,7 +6,7 @@
*/
#include <crypto/aes.h>
-#include <crypto/algapi.h>
+#include <crypto/utils.h>
#include <linux/export.h>
#include <linux/module.h>
diff --git a/lib/crypto/chacha.c b/lib/crypto/chacha.c
index e0c7cb4af318..86e5d382a4e0 100644
--- a/lib/crypto/chacha.c
+++ b/lib/crypto/chacha.c
@@ -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>
diff --git a/lib/crypto/memneq.c b/lib/crypto/memneq.c
index 44daacb8cb51..08924acd44bc 100644
--- a/lib/crypto/memneq.c
+++ b/lib/crypto/memneq.c
@@ -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)