From 9c9ad845ef372a4c47a01c20e939fd2c40bc7ac6 Mon Sep 17 00:00:00 2001 From: Chunwei Chen Date: Wed, 14 Dec 2016 18:24:47 -0800 Subject: Refactor some splat macro to function Refactor the code by making splat_test_{init,fini}, splat_subsystem_{init,fini} into functions. They don't have reason to be macro and it would be too bloated to inline every call. Signed-off-by: Chunwei Chen --- module/splat/splat-thread.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'module/splat/splat-thread.c') diff --git a/module/splat/splat-thread.c b/module/splat/splat-thread.c index 8a4471407..a043fc74f 100644 --- a/module/splat/splat-thread.c +++ b/module/splat/splat-thread.c @@ -362,11 +362,11 @@ splat_thread_init(void) spin_lock_init(&sub->test_lock); sub->desc.id = SPLAT_SUBSYSTEM_THREAD; - SPLAT_TEST_INIT(sub, SPLAT_THREAD_TEST1_NAME, SPLAT_THREAD_TEST1_DESC, + splat_test_init(sub, SPLAT_THREAD_TEST1_NAME, SPLAT_THREAD_TEST1_DESC, SPLAT_THREAD_TEST1_ID, splat_thread_test1); - SPLAT_TEST_INIT(sub, SPLAT_THREAD_TEST2_NAME, SPLAT_THREAD_TEST2_DESC, + splat_test_init(sub, SPLAT_THREAD_TEST2_NAME, SPLAT_THREAD_TEST2_DESC, SPLAT_THREAD_TEST2_ID, splat_thread_test2); - SPLAT_TEST_INIT(sub, SPLAT_THREAD_TEST3_NAME, SPLAT_THREAD_TEST3_DESC, + splat_test_init(sub, SPLAT_THREAD_TEST3_NAME, SPLAT_THREAD_TEST3_DESC, SPLAT_THREAD_TEST3_ID, splat_thread_test3); return sub; @@ -376,9 +376,9 @@ void splat_thread_fini(splat_subsystem_t *sub) { ASSERT(sub); - SPLAT_TEST_FINI(sub, SPLAT_THREAD_TEST3_ID); - SPLAT_TEST_FINI(sub, SPLAT_THREAD_TEST2_ID); - SPLAT_TEST_FINI(sub, SPLAT_THREAD_TEST1_ID); + splat_test_fini(sub, SPLAT_THREAD_TEST3_ID); + splat_test_fini(sub, SPLAT_THREAD_TEST2_ID); + splat_test_fini(sub, SPLAT_THREAD_TEST1_ID); kfree(sub); } -- cgit v1.2.3