aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2010-10-26 17:23:06 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-26 19:52:18 -0400
commitbb2ab10fa693110cffa7087ffe2749d6e9a27d5f (patch)
treef45c76ec0bdae972fc8a1bb2cf04bca31c02c88c /lib
parent6d411e6c01608cefb7b9ea6712110538a1432f9f (diff)
lib/list_sort: test: use more reasonable printk levels
I do not see any reason to use KERN_WARN for normal messages and KERN_EMERG for error messages in the lib_sort testing routine. Let's use more reasonable KERN_NORM and KERN_ERR levels. 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')
-rw-r--r--lib/list_sort.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/list_sort.c b/lib/list_sort.c
index 827794016bfb..679b3a060e7e 100644
--- a/lib/list_sort.c
+++ b/lib/list_sort.c
@@ -166,7 +166,7 @@ static int __init list_sort_test(void)
166 struct list_head *head = kmalloc(sizeof(*head), GFP_KERNEL); 166 struct list_head *head = kmalloc(sizeof(*head), GFP_KERNEL);
167 struct list_head *cur; 167 struct list_head *cur;
168 168
169 printk(KERN_WARNING "testing list_sort()\n"); 169 printk(KERN_DEBUG "testing list_sort()\n");
170 170
171 cur = head; 171 cur = head;
172 for (i = 0; i < LIST_SORT_TEST_LENGTH; i++) { 172 for (i = 0; i < LIST_SORT_TEST_LENGTH; i++) {
@@ -189,17 +189,17 @@ static int __init list_sort_test(void)
189 struct debug_el *el = container_of(cur, struct debug_el, l_h); 189 struct debug_el *el = container_of(cur, struct debug_el, l_h);
190 int cmp_result = cmp(NULL, cur, cur->next); 190 int cmp_result = cmp(NULL, cur, cur->next);
191 if (cur->next->prev != cur) { 191 if (cur->next->prev != cur) {
192 printk(KERN_EMERG "list_sort() returned " 192 printk(KERN_ERR "list_sort() returned "
193 "a corrupted list!\n"); 193 "a corrupted list!\n");
194 return 1; 194 return 1;
195 } else if (cmp_result > 0) { 195 } else if (cmp_result > 0) {
196 printk(KERN_EMERG "list_sort() failed to sort!\n"); 196 printk(KERN_ERR "list_sort() failed to sort!\n");
197 return 1; 197 return 1;
198 } else if (cmp_result == 0 && 198 } else if (cmp_result == 0 &&
199 el->serial >= container_of(cur->next, 199 el->serial >= container_of(cur->next,
200 struct debug_el, l_h)->serial) { 200 struct debug_el, l_h)->serial) {
201 printk(KERN_EMERG "list_sort() failed to preserve order" 201 printk(KERN_ERR "list_sort() failed to preserve order "
202 " of equivalent elements!\n"); 202 "of equivalent elements!\n");
203 return 1; 203 return 1;
204 } 204 }
205 kfree(cur->prev); 205 kfree(cur->prev);
@@ -207,8 +207,8 @@ static int __init list_sort_test(void)
207 } 207 }
208 kfree(cur); 208 kfree(cur);
209 if (count != LIST_SORT_TEST_LENGTH) { 209 if (count != LIST_SORT_TEST_LENGTH) {
210 printk(KERN_EMERG "list_sort() returned list of" 210 printk(KERN_ERR "list_sort() returned list of "
211 "different length!\n"); 211 "different length!\n");
212 return 1; 212 return 1;
213 } 213 }
214 return 0; 214 return 0;