fscrypt: explicitly include <linux/export.h>
Eric Biggers
maintainerPATCH 1/1 fscrypt: explicitly include <linux/export.h>
From: Eric Biggers <[email protected]>
Fix build warnings with W=1 that started appearing after commit a934a57a42f6 ("scripts/misc-check: check missing #include <linux/export.h> when W=1").
While at it, also sort the include lists alphabetically.
---
This patch applies to v6.16-rc1 and is targeting fscrypt/for-next.
fs/crypto/bio.c | 6 ++++-- fs/crypto/crypto.c | 8 +++++--- fs/crypto/fname.c | 6 ++++-- fs/crypto/hkdf.c | 2 +- fs/crypto/hooks.c | 2 ++ fs/crypto/inline_crypt.c | 1 + fs/crypto/keyring.c | 5 +++-- fs/crypto/keysetup.c | 1 + fs/crypto/policy.c | 4 +++- 9 files changed, 24 insertions(+), 11 deletions(-)
fs/crypto/bio.c +4 -2
@@ -5,14 +5,16 @@* * Copyright (C) 2015, Google, Inc. * Copyright (C) 2015, Motorola Mobility */ -#include <linux/pagemap.h> -#include <linux/module.h> #include <linux/bio.h> +#include <linux/export.h> +#include <linux/module.h> #include <linux/namei.h> +#include <linux/pagemap.h> +#include "fscrypt_private.h" /** * fscrypt_decrypt_bio() - decrypt the contents of a bio * @bio: the bio to decrypt
fs/crypto/crypto.c +5 -3
@@ -18,16 +18,18 @@* * The usage of AES-XTS should conform to recommendations in NIST * Special Publication 800-38E and IEEE P1619/D16. */ -#include <linux/pagemap.h> +#include <crypto/skcipher.h> +#include <linux/export.h> #include <linux/mempool.h> #include <linux/module.h> -#include <linux/scatterlist.h> +#include <linux/pagemap.h> #include <linux/ratelimit.h> -#include <crypto/skcipher.h> +#include <linux/scatterlist.h> +#include "fscrypt_private.h" static unsigned int num_prealloc_crypto_pages =32 ;module_param (num_prealloc_crypto_pages, uint,0444 );
fs/crypto/fname.c +4 -2
@@ -9,15 +9,17 @@* Modified by Jaegeuk Kim, 2015. * * This has not yet undergone a rigorous security audit. */ -#include <linux/namei.h> -#include <linux/scatterlist.h> #include <crypto/hash.h> #include <crypto/sha2.h> #include <crypto/skcipher.h> +#include <linux/export.h> +#include <linux/namei.h> +#include <linux/scatterlist.h> +#include "fscrypt_private.h" /* * The minimum message length (input and output length), in bytes, for all * filenames encryption modes. Filenames shorter than this will be zero-padded
fs/crypto/hkdf.c +1 -1
@@ -6,12 +6,12 @@* * Copyright 2019 Google LLC */ #include <crypto/hash.h> -#include <crypto/sha2.h> #include <crypto/hkdf.h> +#include <crypto/sha2.h> #include "fscrypt_private.h" /* * HKDF supports any unkeyed cryptographic hash algorithm, but fscrypt uses
fs/crypto/hooks.c +2 -0
@@ -3,10 +3,12 @@* fs/crypto/hooks.c * * Encryption hooks for higher-level filesystem operations. */ +#include <linux/export.h> +#include "fscrypt_private.h" /** * fscrypt_file_open() - prepare to open a possibly-encrypted regular file * @inode: the inode being opened
fs/crypto/inline_crypt.c +1 -0
@@ -13,10 +13,11 @@*/ #include <linux/blk-crypto.h> #include <linux/blkdev.h> #include <linux/buffer_head.h> +#include <linux/export.h> #include <linux/sched/mm.h> #include <linux/slab.h> #include <linux/uio.h> #include "fscrypt_private.h"
fs/crypto/keyring.c +3 -2
@@ -16,16 +16,17 @@* * See the "User API" section of Documentation/filesystems/fscrypt.rst for more * information about these ioctls. */ -#include <linux/unaligned.h> #include <crypto/skcipher.h> +#include <linux/export.h> #include <linux/key-type.h> -#include <linux/random.h> #include <linux/once.h> +#include <linux/random.h> #include <linux/seq_file.h> +#include <linux/unaligned.h> #include "fscrypt_private.h" /* The master encryption keys for a filesystem (->s_master_keys) */ struct fscrypt_keyring {
fs/crypto/keysetup.c +1 -0
@@ -7,10 +7,11 @@* Originally written by Michael Halcrow, Ildar Muslukhov, and Uday Savagaonkar. * Heavily modified since then. */ #include <crypto/skcipher.h> +#include <linux/export.h> #include <linux/random.h> #include "fscrypt_private.h" struct fscrypt_mode fscrypt_modes[] = {
fs/crypto/policy.c +3 -1
@@ -8,15 +8,17 @@* Originally written by Michael Halcrow, 2015. * Modified by Jaegeuk Kim, 2015. * Modified by Eric Biggers, 2019 for v2 policy support. */ +#include <linux/export.h> #include <linux/fs_context.h> +#include <linux/mount.h> #include <linux/random.h> #include <linux/seq_file.h> #include <linux/string.h> -#include <linux/mount.h> +#include "fscrypt_private.h" /** * fscrypt_policies_equal() - check whether two encryption policies are the same * @policy1: the first policy
base-commit: 19272b37aa4f83ca52bdf9c16d5d81bdd1354494
Signature · 1 line
2.49.0
Quoted 6 lines · Eric Biggers
From: Eric Biggers <[email protected]>
Fix build warnings with W=1 that started appearing after commit
a934a57a42f6("scripts/misc-check: check missing #include <linux/export.h> when W=1").
Quoted 6 lines
While at it, also sort the include lists alphabetically.
Signed-off-by Eric Biggers <[email protected]>---
This patch applies to v6.16-rc1 and is targeting fscrypt/for-next.
Applied to https://git.kernel.org/pub/scm/fs/fscrypt/linux.git/log/?h=for-next
- Eric