diff options
author | Chunwei Chen <[email protected]> | 2016-12-14 18:24:47 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2016-12-15 11:30:11 -0800 |
commit | 9c9ad845ef372a4c47a01c20e939fd2c40bc7ac6 (patch) | |
tree | 81975a6019ca294556aecdeb180ad6b00a1fe50b /module/splat/splat-rwlock.c | |
parent | 71a3c9c45d7829994d3d66f014410f7c223f88f7 (diff) |
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 <[email protected]>
Diffstat (limited to 'module/splat/splat-rwlock.c')
-rw-r--r-- | module/splat/splat-rwlock.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/module/splat/splat-rwlock.c b/module/splat/splat-rwlock.c index 87bc0c1c0..c11ab94f2 100644 --- a/module/splat/splat-rwlock.c +++ b/module/splat/splat-rwlock.c @@ -686,19 +686,19 @@ splat_rwlock_init(void) spin_lock_init(&sub->test_lock); sub->desc.id = SPLAT_SUBSYSTEM_RWLOCK; - SPLAT_TEST_INIT(sub, SPLAT_RWLOCK_TEST1_NAME, SPLAT_RWLOCK_TEST1_DESC, + splat_test_init(sub, SPLAT_RWLOCK_TEST1_NAME, SPLAT_RWLOCK_TEST1_DESC, SPLAT_RWLOCK_TEST1_ID, splat_rwlock_test1); - SPLAT_TEST_INIT(sub, SPLAT_RWLOCK_TEST2_NAME, SPLAT_RWLOCK_TEST2_DESC, + splat_test_init(sub, SPLAT_RWLOCK_TEST2_NAME, SPLAT_RWLOCK_TEST2_DESC, SPLAT_RWLOCK_TEST2_ID, splat_rwlock_test2); - SPLAT_TEST_INIT(sub, SPLAT_RWLOCK_TEST3_NAME, SPLAT_RWLOCK_TEST3_DESC, + splat_test_init(sub, SPLAT_RWLOCK_TEST3_NAME, SPLAT_RWLOCK_TEST3_DESC, SPLAT_RWLOCK_TEST3_ID, splat_rwlock_test3); - SPLAT_TEST_INIT(sub, SPLAT_RWLOCK_TEST4_NAME, SPLAT_RWLOCK_TEST4_DESC, + splat_test_init(sub, SPLAT_RWLOCK_TEST4_NAME, SPLAT_RWLOCK_TEST4_DESC, SPLAT_RWLOCK_TEST4_ID, splat_rwlock_test4); - SPLAT_TEST_INIT(sub, SPLAT_RWLOCK_TEST5_NAME, SPLAT_RWLOCK_TEST5_DESC, + splat_test_init(sub, SPLAT_RWLOCK_TEST5_NAME, SPLAT_RWLOCK_TEST5_DESC, SPLAT_RWLOCK_TEST5_ID, splat_rwlock_test5); - SPLAT_TEST_INIT(sub, SPLAT_RWLOCK_TEST6_NAME, SPLAT_RWLOCK_TEST6_DESC, + splat_test_init(sub, SPLAT_RWLOCK_TEST6_NAME, SPLAT_RWLOCK_TEST6_DESC, SPLAT_RWLOCK_TEST6_ID, splat_rwlock_test6); - SPLAT_TEST_INIT(sub, SPLAT_RWLOCK_TEST7_NAME, SPLAT_RWLOCK_TEST7_DESC, + splat_test_init(sub, SPLAT_RWLOCK_TEST7_NAME, SPLAT_RWLOCK_TEST7_DESC, SPLAT_RWLOCK_TEST7_ID, splat_rwlock_test7); return sub; @@ -708,13 +708,13 @@ void splat_rwlock_fini(splat_subsystem_t *sub) { ASSERT(sub); - SPLAT_TEST_FINI(sub, SPLAT_RWLOCK_TEST7_ID); - SPLAT_TEST_FINI(sub, SPLAT_RWLOCK_TEST6_ID); - SPLAT_TEST_FINI(sub, SPLAT_RWLOCK_TEST5_ID); - SPLAT_TEST_FINI(sub, SPLAT_RWLOCK_TEST4_ID); - SPLAT_TEST_FINI(sub, SPLAT_RWLOCK_TEST3_ID); - SPLAT_TEST_FINI(sub, SPLAT_RWLOCK_TEST2_ID); - SPLAT_TEST_FINI(sub, SPLAT_RWLOCK_TEST1_ID); + splat_test_fini(sub, SPLAT_RWLOCK_TEST7_ID); + splat_test_fini(sub, SPLAT_RWLOCK_TEST6_ID); + splat_test_fini(sub, SPLAT_RWLOCK_TEST5_ID); + splat_test_fini(sub, SPLAT_RWLOCK_TEST4_ID); + splat_test_fini(sub, SPLAT_RWLOCK_TEST3_ID); + splat_test_fini(sub, SPLAT_RWLOCK_TEST2_ID); + splat_test_fini(sub, SPLAT_RWLOCK_TEST1_ID); kfree(sub); } |