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

Fix build warnings with W=1 that started appearing after
commit a934a57a42 ("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>
This commit is contained in:
Eric Biggers 2025-06-12 11:38:52 -07:00
parent 61d01fb7af
commit 1a822ea52a
9 changed files with 22 additions and 12 deletions

View File

@ -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

View File

@ -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] = {

View File

@ -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:

View File

@ -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] = {

View File

@ -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>

View File

@ -4,6 +4,7 @@
*/
#include <linux/crc4.h>
#include <linux/export.h>
#include <linux/module.h>
static const uint8_t crc4_tab[] = {

View File

@ -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

View File

@ -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).

View File

@ -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>
/**