Skip to content

Commit c6a14b3

Browse files
author
Eric Biggers
committed
fscrypt: Explicitly include <linux/export.h>
Fix build warnings with W=1 that started appearing after commit a934a57 ("scripts/misc-check: check missing #include <linux/export.h> when W=1"). While at it, also sort the include lists alphabetically. Link: https://lore.kernel.org/r/20250614221301.100803-1-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@kernel.org>
1 parent e04c78d commit c6a14b3

9 files changed

Lines changed: 24 additions & 11 deletions

File tree

fs/crypto/bio.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@
77
* Copyright (C) 2015, Motorola Mobility
88
*/
99

10-
#include <linux/pagemap.h>
11-
#include <linux/module.h>
1210
#include <linux/bio.h>
11+
#include <linux/export.h>
12+
#include <linux/module.h>
1313
#include <linux/namei.h>
14+
#include <linux/pagemap.h>
15+
1416
#include "fscrypt_private.h"
1517

1618
/**

fs/crypto/crypto.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,14 @@
2020
* Special Publication 800-38E and IEEE P1619/D16.
2121
*/
2222

23-
#include <linux/pagemap.h>
23+
#include <crypto/skcipher.h>
24+
#include <linux/export.h>
2425
#include <linux/mempool.h>
2526
#include <linux/module.h>
26-
#include <linux/scatterlist.h>
27+
#include <linux/pagemap.h>
2728
#include <linux/ratelimit.h>
28-
#include <crypto/skcipher.h>
29+
#include <linux/scatterlist.h>
30+
2931
#include "fscrypt_private.h"
3032

3133
static unsigned int num_prealloc_crypto_pages = 32;

fs/crypto/fname.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@
1111
* This has not yet undergone a rigorous security audit.
1212
*/
1313

14-
#include <linux/namei.h>
15-
#include <linux/scatterlist.h>
1614
#include <crypto/hash.h>
1715
#include <crypto/sha2.h>
1816
#include <crypto/skcipher.h>
17+
#include <linux/export.h>
18+
#include <linux/namei.h>
19+
#include <linux/scatterlist.h>
20+
1921
#include "fscrypt_private.h"
2022

2123
/*

fs/crypto/hkdf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
*/
99

1010
#include <crypto/hash.h>
11-
#include <crypto/sha2.h>
1211
#include <crypto/hkdf.h>
12+
#include <crypto/sha2.h>
1313

1414
#include "fscrypt_private.h"
1515

fs/crypto/hooks.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* Encryption hooks for higher-level filesystem operations.
66
*/
77

8+
#include <linux/export.h>
9+
810
#include "fscrypt_private.h"
911

1012
/**

fs/crypto/inline_crypt.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <linux/blk-crypto.h>
1616
#include <linux/blkdev.h>
1717
#include <linux/buffer_head.h>
18+
#include <linux/export.h>
1819
#include <linux/sched/mm.h>
1920
#include <linux/slab.h>
2021
#include <linux/uio.h>

fs/crypto/keyring.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,13 @@
1818
* information about these ioctls.
1919
*/
2020

21-
#include <linux/unaligned.h>
2221
#include <crypto/skcipher.h>
22+
#include <linux/export.h>
2323
#include <linux/key-type.h>
24-
#include <linux/random.h>
2524
#include <linux/once.h>
25+
#include <linux/random.h>
2626
#include <linux/seq_file.h>
27+
#include <linux/unaligned.h>
2728

2829
#include "fscrypt_private.h"
2930

fs/crypto/keysetup.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
*/
1010

1111
#include <crypto/skcipher.h>
12+
#include <linux/export.h>
1213
#include <linux/random.h>
1314

1415
#include "fscrypt_private.h"

fs/crypto/policy.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@
1010
* Modified by Eric Biggers, 2019 for v2 policy support.
1111
*/
1212

13+
#include <linux/export.h>
1314
#include <linux/fs_context.h>
15+
#include <linux/mount.h>
1416
#include <linux/random.h>
1517
#include <linux/seq_file.h>
1618
#include <linux/string.h>
17-
#include <linux/mount.h>
19+
1820
#include "fscrypt_private.h"
1921

2022
/**

0 commit comments

Comments
 (0)