[patch 169/192] lib/test_string.c: allow module removal

From
Andrew Morton <akpm@linux-foundation.org>
Date
2021-07-01 01:56:09
Also in
mm-commits
Reply to
Andrew Morton, 2021-07-01
From: Matteo Croce <redacted>
Subject: lib/test_string.c: allow module removal

The test_string module can't be removed because it lacks an exit hook. 
Since there is no reason for it to be permanent, add an empty one to allow
module removal.

Link: https://lkml.kernel.org/r/20210616234503.28678-1-mcroce@linux.microsoft.com (local)
Signed-off-by: Matteo Croce <redacted>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 lib/test_string.c |    5 +++++
 1 file changed, 5 insertions(+)
--- a/lib/test_string.c~lib-test_stringc-allow-mode-removal
+++ a/lib/test_string.c
@@ -179,6 +179,10 @@ static __init int strnchr_selftest(void)
 	return 0;
 }
 
+static __exit void string_selftest_remove(void)
+{
+}
+
 static __init int string_selftest_init(void)
 {
 	int test, subtest;
@@ -216,4 +220,5 @@ fail:
 }
 
 module_init(string_selftest_init);
+module_exit(string_selftest_remove);
 MODULE_LICENSE("GPL v2");
_
Thread (212 messages) 212 messages, 11 authors, last reply 2021-07-12
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help