Lines Matching refs:ret
62 int ret; in __test_mutex() local
81 ret = 0; in __test_mutex()
84 ret = -EINVAL; in __test_mutex()
90 ret = wait_for_completion_timeout(&mtx.done, TIMEOUT); in __test_mutex()
95 if (ret) { in __test_mutex()
98 ret = -EINVAL; in __test_mutex()
103 return ret; in __test_mutex()
109 int ret; in test_mutex() local
113 ret = __test_mutex(i); in test_mutex()
114 if (ret) in test_mutex()
115 return ret; in test_mutex()
125 int ret; in test_aa() local
132 ret = ww_mutex_lock(&mutex, &ctx); in test_aa()
133 if (ret) { in test_aa()
138 ret = !ww_mutex_trylock(&mutex, &ctx); in test_aa()
139 if (ret) { in test_aa()
148 ret = -EINVAL; in test_aa()
155 ret = -EINVAL; in test_aa()
159 ret = ww_mutex_lock(&mutex, &ctx); in test_aa()
160 if (ret != -EALREADY) { in test_aa()
162 __func__, ret, from); in test_aa()
163 if (!ret) in test_aa()
165 ret = -EINVAL; in test_aa()
170 ret = 0; in test_aa()
173 return ret; in test_aa()
222 int err, ret; in test_abba() local
260 ret = 0; in test_abba()
265 ret = -EINVAL; in test_abba()
271 ret = -EINVAL; in test_abba()
274 return ret; in test_abba()
319 int ret; in __test_cycle() local
349 ret = 0; in __test_cycle()
358 ret = -EINVAL; in __test_cycle()
365 return ret; in __test_cycle()
371 int ret; in test_cycle() local
374 ret = __test_cycle(n); in test_cycle()
375 if (ret) in test_cycle()
376 return ret; in test_cycle()
394 u32 ret; in prandom_u32_below() local
397 ret = prandom_u32_state(&rng) % ceil; in prandom_u32_below()
399 return ret; in prandom_u32_below()
641 int ret, i; in run_tests() local
645 ret = test_mutex(); in run_tests()
646 if (ret) in run_tests()
647 return ret; in run_tests()
649 ret = test_aa(false); in run_tests()
650 if (ret) in run_tests()
651 return ret; in run_tests()
653 ret = test_aa(true); in run_tests()
654 if (ret) in run_tests()
655 return ret; in run_tests()
658 ret = test_abba(i & 1, i & 2); in run_tests()
659 if (ret) in run_tests()
660 return ret; in run_tests()
663 ret = test_cycle(ncpus); in run_tests()
664 if (ret) in run_tests()
665 return ret; in run_tests()
667 ret = stress(16, 2*ncpus, STRESS_INORDER); in run_tests()
668 if (ret) in run_tests()
669 return ret; in run_tests()
671 ret = stress(16, 2*ncpus, STRESS_REORDER); in run_tests()
672 if (ret) in run_tests()
673 return ret; in run_tests()
675 ret = stress(2047, hweight32(STRESS_ALL)*ncpus, STRESS_ALL); in run_tests()
676 if (ret) in run_tests()
677 return ret; in run_tests()
713 int ret; in test_ww_mutex_init() local
728 ret = sysfs_create_group(test_ww_mutex_kobj, &attr_group); in test_ww_mutex_init()
729 if (ret) { in test_ww_mutex_init()
732 return ret; in test_ww_mutex_init()
736 ret = run_tests(); in test_ww_mutex_init()
739 return ret; in test_ww_mutex_init()