diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2010-10-26 17:23:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-26 19:52:18 -0400 |
commit | 6d411e6c01608cefb7b9ea6712110538a1432f9f (patch) | |
tree | 5466fa9f8cd1ee9cdd1f5da01ae0ea14fe8437b7 /lib/list_sort.c | |
parent | e2852ae825dba5ebc159788720baec1a28a57125 (diff) |
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 <Artem.Bityutskiy@nokia.com>
Cc: Don Mullis <don.mullis@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib/list_sort.c')
-rw-r--r-- | lib/list_sort.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/list_sort.c b/lib/list_sort.c index a7616fa3162e..827794016bfb 100644 --- a/lib/list_sort.c +++ b/lib/list_sort.c | |||
@@ -141,7 +141,7 @@ void list_sort(void *priv, struct list_head *head, | |||
141 | } | 141 | } |
142 | EXPORT_SYMBOL(list_sort); | 142 | EXPORT_SYMBOL(list_sort); |
143 | 143 | ||
144 | #ifdef DEBUG_LIST_SORT | 144 | #ifdef CONFIG_TEST_LIST_SORT |
145 | struct debug_el { | 145 | struct debug_el { |
146 | struct list_head l_h; | 146 | struct list_head l_h; |
147 | int value; | 147 | int value; |
@@ -214,4 +214,4 @@ static int __init list_sort_test(void) | |||
214 | return 0; | 214 | return 0; |
215 | } | 215 | } |
216 | module_init(list_sort_test); | 216 | module_init(list_sort_test); |
217 | #endif | 217 | #endif /* CONFIG_TEST_LIST_SORT */ |