Skip to contentSkip to conversation

lib: cleanup dead code from lib/percpu_test.c

PATCH New Pravin Shedge 1 participant 1 message Dec 17, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 3/3 lib: cleanup dead code from lib/percpu_test.c

lib/percpu_test.c code allows to compile either as a loadable modules or builtin into the kernel.

Current code returns -EAGAIN on successful termination from module_init. Such a fail will directly unload the module and hence there is no scope to execute percpu_test_exit on module_exit.

---
 lib/percpu_test.c | 5 -----
 1 file changed, 5 deletions(-)
lib/percpu_test.c +0 -5
index 0b5d14d..ea31adb 100644
@@ -126,12 +126,7 @@ static int __init percpu_test_init(void)
 	return -EAGAIN;  /* Fail will directly unload the module */
 }
 
-static void __exit percpu_test_exit(void)
-{
-}
-
 module_init(percpu_test_init)
-module_exit(percpu_test_exit)
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Greg Thelen");
Signature · 1 line
2.7.4