lkml.org 
[lkml]   [2021]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] lib/test_string.c: allow mode removal
Date
From: Matteo Croce <mcroce@microsoft.com>

The test_string 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.

Signed-off-by: Matteo Croce <mcroce@microsoft.com>
---
lib/test_string.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/lib/test_string.c b/lib/test_string.c
index 7b31f4a505bf..9dfd6f52de92 100644
--- a/lib/test_string.c
+++ b/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 @@ static __init int string_selftest_init(void)
}

module_init(string_selftest_init);
+module_exit(string_selftest_remove);
MODULE_LICENSE("GPL v2");
--
2.31.1
\
 
 \ /
  Last update: 2021-06-17 01:46    [W:0.039 / U:0.936 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site