Commit 89a51591 authored by Eric Biggers's avatar Eric Biggers
Browse files

lib/crc: Move files into lib/crc/



Move all CRC files in lib/ into a subdirectory lib/crc/ to keep them
from cluttering up the main lib/ directory.

Reviewed-by: default avatar"Martin K. Petersen" <martin.petersen@oracle.com>
Acked-by: default avatarIngo Molnar <mingo@kernel.org>
Acked-by: default avatar"Jason A. Donenfeld" <Jason@zx2c4.com>
Link: https://lore.kernel.org/r/20250607200454.73587-2-ebiggers@kernel.org


Signed-off-by: default avatarEric Biggers <ebiggers@kernel.org>
parent f2703a10
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -136,24 +136,24 @@ Arithmetic Overflow Checking
CRC Functions
-------------

.. kernel-doc:: lib/crc4.c
.. kernel-doc:: lib/crc/crc4.c
   :export:

.. kernel-doc:: lib/crc7.c
.. kernel-doc:: lib/crc/crc7.c
   :export:

.. kernel-doc:: lib/crc8.c
.. kernel-doc:: lib/crc/crc8.c
   :export:

.. kernel-doc:: lib/crc16.c
.. kernel-doc:: lib/crc/crc16.c
   :export:

.. kernel-doc:: lib/crc32.c
.. kernel-doc:: lib/crc/crc32.c

.. kernel-doc:: lib/crc-ccitt.c
.. kernel-doc:: lib/crc/crc-ccitt.c
   :export:

.. kernel-doc:: lib/crc-itu-t.c
.. kernel-doc:: lib/crc/crc-itu-t.c
   :export:

Base 2 log and power Functions
+1 −2
Original line number Diff line number Diff line
@@ -6361,8 +6361,7 @@ T: git https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git crc-ne
F:	Documentation/staging/crc*
F:	arch/*/lib/crc*
F:	include/linux/crc*
F:	lib/crc*
F:	lib/tests/crc_kunit.c
F:	lib/crc/
F:	scripts/gen-crc-consts.py
CREATIVE SB0540
+0 −3
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0 */
/*
 * See lib/crc64.c for the related specification and polynomial arithmetic.
 */
#ifndef _LINUX_CRC64_H
#define _LINUX_CRC64_H

+1 −87
Original line number Diff line number Diff line
@@ -136,95 +136,9 @@ config TRACE_MMIO_ACCESS
	  Create tracepoints for MMIO read/write operations. These trace events
	  can be used for logging all MMIO read/write operations.

source "lib/crc/Kconfig"
source "lib/crypto/Kconfig"

config CRC_CCITT
	tristate
	help
	  The CRC-CCITT library functions.  Select this if your module uses any
	  of the functions from <linux/crc-ccitt.h>.

config CRC16
	tristate
	help
	  The CRC16 library functions.  Select this if your module uses any of
	  the functions from <linux/crc16.h>.

config CRC_T10DIF
	tristate
	help
	  The CRC-T10DIF library functions.  Select this if your module uses
	  any of the functions from <linux/crc-t10dif.h>.

config ARCH_HAS_CRC_T10DIF
	bool

config CRC_T10DIF_ARCH
	tristate
	default CRC_T10DIF if ARCH_HAS_CRC_T10DIF && CRC_OPTIMIZATIONS

config CRC_ITU_T
	tristate
	help
	  The CRC-ITU-T library functions.  Select this if your module uses
	  any of the functions from <linux/crc-itu-t.h>.

config CRC32
	tristate
	select BITREVERSE
	help
	  The CRC32 library functions.  Select this if your module uses any of
	  the functions from <linux/crc32.h> or <linux/crc32c.h>.

config ARCH_HAS_CRC32
	bool

config CRC32_ARCH
	tristate
	default CRC32 if ARCH_HAS_CRC32 && CRC_OPTIMIZATIONS

config CRC64
	tristate
	help
	  The CRC64 library functions.  Select this if your module uses any of
	  the functions from <linux/crc64.h>.

config ARCH_HAS_CRC64
	bool

config CRC64_ARCH
	tristate
	default CRC64 if ARCH_HAS_CRC64 && CRC_OPTIMIZATIONS

config CRC4
	tristate
	help
	  The CRC4 library functions.  Select this if your module uses any of
	  the functions from <linux/crc4.h>.

config CRC7
	tristate
	help
	  The CRC7 library functions.  Select this if your module uses any of
	  the functions from <linux/crc7.h>.

config CRC8
	tristate
	help
	  The CRC8 library functions.  Select this if your module uses any of
	  the functions from <linux/crc8.h>.

config CRC_OPTIMIZATIONS
	bool "Enable optimized CRC implementations" if EXPERT
	default y
	help
	  Disabling this option reduces code size slightly by disabling the
	  architecture-optimized implementations of any CRC variants that are
	  enabled.  CRC checksumming performance may get much slower.

	  Keep this enabled unless you're really trying to minimize the size of
	  the kernel.

config XXHASH
	tristate

+0 −21
Original line number Diff line number Diff line
@@ -2901,27 +2901,6 @@ config HW_BREAKPOINT_KUNIT_TEST

	  If unsure, say N.

config CRC_KUNIT_TEST
	tristate "KUnit tests for CRC functions" if !KUNIT_ALL_TESTS
	depends on KUNIT
	default KUNIT_ALL_TESTS
	select CRC7
	select CRC16
	select CRC_T10DIF
	select CRC32
	select CRC64
	help
	  Unit tests for the CRC library functions.

	  This is intended to help people writing architecture-specific
	  optimized versions.  If unsure, say N.

config CRC_BENCHMARK
	bool "Benchmark for the CRC functions"
	depends on CRC_KUNIT_TEST
	help
	  Include benchmarks in the KUnit test suite for the CRC functions.

config SIPHASH_KUNIT_TEST
	tristate "Perform selftest on siphash functions" if !KUNIT_ALL_TESTS
	depends on KUNIT
Loading