diff options
author | Eric Biggers <ebiggers@kernel.org> | 2025-06-12 21:38:52 +0300 |
---|---|---|
committer | Eric Biggers <ebiggers@kernel.org> | 2025-06-30 19:31:57 +0300 |
commit | 1a822ea52ad0d844805db32333a51d41ffcdf869 (patch) | |
tree | 602e4fddde6c2f96d78a0a2070bdb649121021ac | |
parent | 61d01fb7afc212358b0213c489192fd04b2566e1 (diff) | |
download | linux-1a822ea52ad0d844805db32333a51d41ffcdf869.tar.xz |
lib/crc: Explicitly include <linux/export.h>
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, sort the include lists
alphabetically.
Link: https://lore.kernel.org/r/20250612183852.114878-1-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
-rw-r--r-- | lib/crc/crc-ccitt.c | 5 | ||||
-rw-r--r-- | lib/crc/crc-itu-t.c | 5 | ||||
-rw-r--r-- | lib/crc/crc-t10dif-main.c | 5 | ||||
-rw-r--r-- | lib/crc/crc16.c | 5 | ||||
-rw-r--r-- | lib/crc/crc32-main.c | 1 | ||||
-rw-r--r-- | lib/crc/crc4.c | 1 | ||||
-rw-r--r-- | lib/crc/crc64-main.c | 4 | ||||
-rw-r--r-- | lib/crc/crc7.c | 5 | ||||
-rw-r--r-- | lib/crc/crc8.c | 3 |
9 files changed, 22 insertions, 12 deletions
diff --git a/lib/crc/crc-ccitt.c b/lib/crc/crc-ccitt.c index 8d2bc419230b..f8692c3de101 100644 --- a/lib/crc/crc-ccitt.c +++ b/lib/crc/crc-ccitt.c @@ -1,8 +1,9 @@ // SPDX-License-Identifier: GPL-2.0-only -#include <linux/types.h> -#include <linux/module.h> #include <linux/crc-ccitt.h> +#include <linux/export.h> +#include <linux/module.h> +#include <linux/types.h> /* * This mysterious table is just the CRC of each possible byte. It can be diff --git a/lib/crc/crc-itu-t.c b/lib/crc/crc-itu-t.c index 1d26a1647da5..6e413a290f54 100644 --- a/lib/crc/crc-itu-t.c +++ b/lib/crc/crc-itu-t.c @@ -3,9 +3,10 @@ * crc-itu-t.c */ -#include <linux/types.h> -#include <linux/module.h> #include <linux/crc-itu-t.h> +#include <linux/export.h> +#include <linux/module.h> +#include <linux/types.h> /* CRC table for the CRC ITU-T V.41 0x1021 (x^16 + x^12 + x^5 + 1) */ const u16 crc_itu_t_table[256] = { diff --git a/lib/crc/crc-t10dif-main.c b/lib/crc/crc-t10dif-main.c index bc91f3888184..08dde238e89f 100644 --- a/lib/crc/crc-t10dif-main.c +++ b/lib/crc/crc-t10dif-main.c @@ -6,9 +6,10 @@ * Written by Martin K. Petersen <martin.petersen@oracle.com> */ -#include <linux/types.h> -#include <linux/module.h> #include <linux/crc-t10dif.h> +#include <linux/export.h> +#include <linux/module.h> +#include <linux/types.h> /* * Table generated using the following polynomial: diff --git a/lib/crc/crc16.c b/lib/crc/crc16.c index 9c71eda9bf4b..931660a8cbaa 100644 --- a/lib/crc/crc16.c +++ b/lib/crc/crc16.c @@ -3,9 +3,10 @@ * crc16.c */ -#include <linux/types.h> -#include <linux/module.h> #include <linux/crc16.h> +#include <linux/export.h> +#include <linux/module.h> +#include <linux/types.h> /** CRC table for the CRC-16. The poly is 0x8005 (x^16 + x^15 + x^2 + 1) */ static const u16 crc16_table[256] = { diff --git a/lib/crc/crc32-main.c b/lib/crc/crc32-main.c index 7843512ffef4..fbb90c9006e5 100644 --- a/lib/crc/crc32-main.c +++ b/lib/crc/crc32-main.c @@ -25,6 +25,7 @@ /* see: Documentation/staging/crc32.rst for a description of algorithms */ #include <linux/crc32.h> +#include <linux/export.h> #include <linux/module.h> #include <linux/types.h> diff --git a/lib/crc/crc4.c b/lib/crc/crc4.c index e7e1779c67d9..8e83fbe60bdc 100644 --- a/lib/crc/crc4.c +++ b/lib/crc/crc4.c @@ -4,6 +4,7 @@ */ #include <linux/crc4.h> +#include <linux/export.h> #include <linux/module.h> static const uint8_t crc4_tab[] = { diff --git a/lib/crc/crc64-main.c b/lib/crc/crc64-main.c index 038afc7f4d44..1337036010fe 100644 --- a/lib/crc/crc64-main.c +++ b/lib/crc/crc64-main.c @@ -33,9 +33,11 @@ * Author: Coly Li <colyli@suse.de> */ +#include <linux/crc64.h> +#include <linux/export.h> #include <linux/module.h> #include <linux/types.h> -#include <linux/crc64.h> + #include "crc64table.h" static inline u64 __maybe_unused diff --git a/lib/crc/crc7.c b/lib/crc/crc7.c index 8dd991cc6114..46b95d7ac6ce 100644 --- a/lib/crc/crc7.c +++ b/lib/crc/crc7.c @@ -3,9 +3,10 @@ * crc7.c */ -#include <linux/types.h> -#include <linux/module.h> #include <linux/crc7.h> +#include <linux/export.h> +#include <linux/module.h> +#include <linux/types.h> /* * Table for CRC-7 (polynomial x^7 + x^3 + 1). diff --git a/lib/crc/crc8.c b/lib/crc/crc8.c index 1ad8e501d9b6..329c52158c45 100644 --- a/lib/crc/crc8.c +++ b/lib/crc/crc8.c @@ -16,8 +16,9 @@ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt -#include <linux/module.h> #include <linux/crc8.h> +#include <linux/export.h> +#include <linux/module.h> #include <linux/printk.h> /** |