Commit e49a3eac authored by Eric Biggers's avatar Eric Biggers
Browse files

lib/crypto: Explicitly include <linux/export.h>

Fix build warnings with W=1 that started appearing after
commit a934a57a ("scripts/misc-check: check missing #include
<linux/export.h> when W=1").

While at it, also sort the include lists alphabetically.  (Keep
asm/irqflags.h last, as otherwise it doesn't build on alpha.)

This handles all of lib/crypto/, but not arch/*/lib/crypto/.  The
exports in arch/*/lib/crypto/ will go away when the code is properly
integrated into lib/crypto/ as planned.

Link: https://lore.kernel.org/r/20250613184814.50173-1-ebiggers@kernel.org


Signed-off-by: default avatarEric Biggers <ebiggers@kernel.org>
parent d0b3b7b2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@

#include <crypto/aes.h>
#include <linux/crypto.h>
#include <linux/export.h>
#include <linux/module.h>
#include <linux/unaligned.h>

+3 −4
Original line number Diff line number Diff line
@@ -5,11 +5,10 @@
 * Copyright 2023 Google LLC
 */

#include <linux/module.h>

#include <crypto/algapi.h>
#include <crypto/aes.h>

#include <crypto/algapi.h>
#include <linux/export.h>
#include <linux/module.h>
#include <asm/irqflags.h>

static void aescfb_encrypt_block(const struct crypto_aes_ctx *ctx, void *dst,
+2 −3
Original line number Diff line number Diff line
@@ -5,12 +5,11 @@
 * Copyright 2022 Google LLC
 */

#include <linux/module.h>

#include <crypto/algapi.h>
#include <crypto/gcm.h>
#include <crypto/ghash.h>

#include <linux/export.h>
#include <linux/module.h>
#include <asm/irqflags.h>

static void aesgcm_encrypt_block(const struct crypto_aes_ctx *ctx, void *dst,
+1 −0
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@
 */

#include <crypto/arc4.h>
#include <linux/export.h>
#include <linux/module.h>

int arc4_setkey(struct arc4_ctx *ctx, const u8 *in_key, unsigned int key_len)
+5 −4
Original line number Diff line number Diff line
@@ -9,11 +9,12 @@
 */

#include <crypto/internal/blake2s.h>
#include <linux/types.h>
#include <linux/string.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/bug.h>
#include <linux/export.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/types.h>
#include <linux/unaligned.h>

static const u8 blake2s_sigma[10][16] = {
Loading