Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+22 -12
+3 -2
lib/crc/crc-ccitt.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0-only 2 2 3 - #include <linux/types.h> 4 - #include <linux/module.h> 5 3 #include <linux/crc-ccitt.h> 4 + #include <linux/export.h> 5 + #include <linux/module.h> 6 + #include <linux/types.h> 6 7 7 8 /* 8 9 * This mysterious table is just the CRC of each possible byte. It can be
+3 -2
lib/crc/crc-itu-t.c
··· 3 3 * crc-itu-t.c 4 4 */ 5 5 6 - #include <linux/types.h> 7 - #include <linux/module.h> 8 6 #include <linux/crc-itu-t.h> 7 + #include <linux/export.h> 8 + #include <linux/module.h> 9 + #include <linux/types.h> 9 10 10 11 /* CRC table for the CRC ITU-T V.41 0x1021 (x^16 + x^12 + x^5 + 1) */ 11 12 const u16 crc_itu_t_table[256] = {
+3 -2
lib/crc/crc-t10dif-main.c
··· 6 6 * Written by Martin K. Petersen <martin.petersen@oracle.com> 7 7 */ 8 8 9 - #include <linux/types.h> 10 - #include <linux/module.h> 11 9 #include <linux/crc-t10dif.h> 10 + #include <linux/export.h> 11 + #include <linux/module.h> 12 + #include <linux/types.h> 12 13 13 14 /* 14 15 * Table generated using the following polynomial:
+3 -2
lib/crc/crc16.c
··· 3 3 * crc16.c 4 4 */ 5 5 6 - #include <linux/types.h> 7 - #include <linux/module.h> 8 6 #include <linux/crc16.h> 7 + #include <linux/export.h> 8 + #include <linux/module.h> 9 + #include <linux/types.h> 9 10 10 11 /** CRC table for the CRC-16. The poly is 0x8005 (x^16 + x^15 + x^2 + 1) */ 11 12 static const u16 crc16_table[256] = {
+1
lib/crc/crc32-main.c
··· 25 25 /* see: Documentation/staging/crc32.rst for a description of algorithms */ 26 26 27 27 #include <linux/crc32.h> 28 + #include <linux/export.h> 28 29 #include <linux/module.h> 29 30 #include <linux/types.h> 30 31
+1
lib/crc/crc4.c
··· 4 4 */ 5 5 6 6 #include <linux/crc4.h> 7 + #include <linux/export.h> 7 8 #include <linux/module.h> 8 9 9 10 static const uint8_t crc4_tab[] = {
+3 -1
lib/crc/crc64-main.c
··· 33 33 * Author: Coly Li <colyli@suse.de> 34 34 */ 35 35 36 + #include <linux/crc64.h> 37 + #include <linux/export.h> 36 38 #include <linux/module.h> 37 39 #include <linux/types.h> 38 - #include <linux/crc64.h> 40 + 39 41 #include "crc64table.h" 40 42 41 43 static inline u64 __maybe_unused
+3 -2
lib/crc/crc7.c
··· 3 3 * crc7.c 4 4 */ 5 5 6 - #include <linux/types.h> 7 - #include <linux/module.h> 8 6 #include <linux/crc7.h> 7 + #include <linux/export.h> 8 + #include <linux/module.h> 9 + #include <linux/types.h> 9 10 10 11 /* 11 12 * Table for CRC-7 (polynomial x^7 + x^3 + 1).
+2 -1
lib/crc/crc8.c
··· 16 16 17 17 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 18 18 19 - #include <linux/module.h> 20 19 #include <linux/crc8.h> 20 + #include <linux/export.h> 21 + #include <linux/module.h> 21 22 #include <linux/printk.h> 22 23 23 24 /**