Skip to contentSkip to conversation

Revert "lib/test_sort.c: make it explicitly non-modular"

PATCH New [email protected] 1 participant 1 message May 8, 2017 Library code

lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 17/114 Revert "lib/test_sort.c: make it explicitly non-modular"

From: Geert Uytterhoeven <[email protected]>
Subject: Revert "lib/test_sort.c: make it explicitly non-modular"

Patch series "lib: add module support to sort tests".

This patch series allows to compile the array-based and linked list sort test code either to loadable modules, or builtin into the kernel.

It's very valuable to have modular tests, so you can run them just by insmodding the test modules, instead of needing a separate kernel that runs them at boot.

This patch (of 3):

This reverts commit 8893f519330bb073a49c5b4676fce4be6f1be15d.

It's very valuable to have modular tests, so you can run them just by insmodding the test modules, instead of needing a separate kernel that runs them at boot.

---

 lib/test_sort.c |   11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
lib/test_sort.c renamed from lib/test_sort.c~revert-lib-test_sortc-make-it-explicitly-non-modular +5 -6
diff -puN lib/test_sort.c~revert-lib-test_sortc-make-it-explicitly-non-modular lib/test_sort.c
@@ -1,11 +1,8 @@
 #include <linux/sort.h>
 #include <linux/slab.h>
-#include <linux/init.h>
+#include <linux/module.h>
 
-/*
- * A simple boot-time regression test
- * License: GPL
- */
+/* a simple boot-time regression test */
 
 #define TEST_LEN 1000
 
@@ -41,4 +38,6 @@ exit:
 	kfree(a);
 	return err;
 }
-subsys_initcall(test_sort_init);
+
+module_init(test_sort_init);
+MODULE_LICENSE("GPL");

_