Skip to content

Commit 8aeeb52

Browse files
author
Eric Biggers
committed
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>
1 parent 8f45af9 commit 8aeeb52

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

lib/crypto/aescfb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77

88
#include <crypto/aes.h>
9-
#include <crypto/algapi.h>
9+
#include <crypto/utils.h>
1010
#include <linux/export.h>
1111
#include <linux/module.h>
1212

lib/crypto/chacha.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
* Copyright (C) 2015 Martin Willi
66
*/
77

8-
#include <crypto/algapi.h> // for crypto_xor_cpy
98
#include <crypto/chacha.h>
9+
#include <crypto/utils.h>
1010
#include <linux/export.h>
1111
#include <linux/kernel.h>
1212
#include <linux/module.h>

lib/crypto/memneq.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
6060
*/
6161

62-
#include <crypto/algapi.h>
62+
#include <crypto/utils.h>
6363
#include <linux/export.h>
6464
#include <linux/module.h>
6565
#include <linux/unaligned.h>
@@ -159,7 +159,7 @@ static inline unsigned long __crypto_memneq_16(const void *a, const void *b)
159159
/* Compare two areas of memory without leaking timing information,
160160
* and with special optimizations for common sizes. Users should
161161
* not call this function directly, but should instead use
162-
* crypto_memneq defined in crypto/algapi.h.
162+
* crypto_memneq defined in crypto/utils.h.
163163
*/
164164
noinline unsigned long __crypto_memneq(const void *a, const void *b,
165165
size_t size)

0 commit comments

Comments
 (0)