From 6d411e6c01608cefb7b9ea6712110538a1432f9f Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Tue, 26 Oct 2010 14:23:05 -0700 Subject: lib/Kconfig.debug: add list_sort debugging switch While hunting a non-existing bug in 'list_sort()', I've improved the 'list_sort_test()' function which tests the 'list_sort()' library call. Although at the end I found a bug in my code, but not in 'list_sort()', I think my clean-ups and improvements are worth merging because they make the test function better. This patch: Make the self-tests selectable via Kconfig rather than by manual enabling of DEBUG_LIST_SORT. Signed-off-by: Artem Bityutskiy Cc: Don Mullis Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- lib/list_sort.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/list_sort.c') diff --git a/lib/list_sort.c b/lib/list_sort.c index a7616fa3162..827794016bf 100644 --- a/lib/list_sort.c +++ b/lib/list_sort.c @@ -141,7 +141,7 @@ void list_sort(void *priv, struct list_head *head, } EXPORT_SYMBOL(list_sort); -#ifdef DEBUG_LIST_SORT +#ifdef CONFIG_TEST_LIST_SORT struct debug_el { struct list_head l_h; int value; @@ -214,4 +214,4 @@ static int __init list_sort_test(void) return 0; } module_init(list_sort_test); -#endif +#endif /* CONFIG_TEST_LIST_SORT */ -- cgit v1.2.3