mirror of
https://github.com/JakeHillion/drgn.git
synced 2024-12-23 01:33:06 +00:00
tests: linux_kernel: fix section mismatch warning in test module
The test kmod build has the following warning that I somehow didn't notice before: WARNING: modpost: /home/osandov/repos/drgn-main/tests/linux_kernel/kmod/drgn_test.o(.init.text+0x3ac): Section mismatch in reference from the function init_module() to the function .exit.text:drgn_test_exit() The function __init init_module() references a function __exit drgn_test_exit(). This is often seen when error handling in the init function uses functionality in the exit path. The fix is often to remove the __exit annotation of drgn_test_exit() so it may be used outside an exit section. Remove the __exit annotation as suggested. Signed-off-by: Omar Sandoval <osandov@osandov.com>
This commit is contained in:
parent
46367a437a
commit
f56b2f117a
@ -269,7 +269,7 @@ int drgn_test_function(int x)
|
||||
return x + 1;
|
||||
}
|
||||
|
||||
static void __exit drgn_test_exit(void)
|
||||
static void drgn_test_exit(void)
|
||||
{
|
||||
drgn_test_slab_exit();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user