lib: add module support to crc32 tests
[email protected]
maintainerPATCH 106/124 lib: add module support to crc32 tests
From: Geert Uytterhoeven <[email protected]>
Subject: lib: add module support to crc32 tests
Extract the crc32 test code into its own source file, to allow to compile it either to a loadable module, or builtin into the kernel.
Signed-off-by Geert Uytterhoeven <[email protected]>
Reviewed-by Andy Shevchenko <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
lib/Kconfig | 3 lib/Makefile | 1 lib/crc32.c | 824 -------------------------------------------- lib/crc32test.c | 856 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 858 insertions(+), 826 deletions(-)
lib/Kconfig renamed from lib/Kconfig~lib-add-module-support-to-crc32-tests +1 -2
@@ -103,8 +103,7 @@ config CRC32 functions require M here. config CRC32_SELFTEST - bool "CRC32 perform self test on init" - default n + tristate "CRC32 perform self test on init" depends on CRC32 help This option enables the CRC32 library functions to perform a
lib/Makefile renamed from lib/Makefile~lib-add-module-support-to-crc32-tests +1 -0
@@ -92,6 +92,7 @@ obj-$(CONFIG_CRC16) += crc16.o obj-$(CONFIG_CRC_T10DIF)+= crc-t10dif.o obj-$(CONFIG_CRC_ITU_T) += crc-itu-t.o obj-$(CONFIG_CRC32) += crc32.o +obj-$(CONFIG_CRC32_SELFTEST) += crc32test.o obj-$(CONFIG_CRC7) += crc7.o obj-$(CONFIG_LIBCRC32C) += libcrc32c.o obj-$(CONFIG_CRC8) += crc8.o
lib/crc32.c renamed from lib/crc32.c~lib-add-module-support-to-crc32-tests +0 -824
827 lines not on this page · raw message
lib/crc32test.c new file +856 -0
856 lines not on this page · raw message
_