lkml.org 
[lkml]   [2010]   [Aug]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 05/10] lib/list_sort: selftest: improve printk wording
From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>

Start boot printk's with "list_sort_test:" prefix to make it obvious
for users where the messages come from; other wording improvements.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: Don Mullis <don.mullis@gmail.com>
---
lib/list_sort.c | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
Index: linux-next/lib/list_sort.c
===================================================================
--- linux-next.orig/lib/list_sort.c 2010-08-23 22:51:19.703177580 -0700
+++ linux-next/lib/list_sort.c 2010-08-23 23:01:55.854177312 -0700
@@ -167,14 +167,14 @@ static int __init list_sort_test(void)
struct list_head head;
struct list_head *cur, *tmp;

- printk(KERN_DEBUG "testing list_sort()\n");
+ printk(KERN_DEBUG "list_sort_test: starting\n");

cur = &head;
for (i = 0; i < LIST_SORT_TEST_LENGTH; i++) {
struct debug_el *el = kmalloc(sizeof(*el), GFP_KERNEL);
if (!el) {
- printk(KERN_ERR "cannot allocate memory -- "
- "testing aborted\n");
+ printk(KERN_ERR "list_sort_test: cannot allocate memory"
+ " -- testing aborted\n");
goto exit;
}
/* force some equivalencies */
@@ -195,26 +195,24 @@ static int __init list_sort_test(void)
struct debug_el *el_next;
int cmp_result = cmp(NULL, cur, cur->next);
if (cur->next->prev != cur) {
- printk(KERN_ERR "list_sort() returned "
- "a corrupted list!\n");
+ printk(KERN_ERR "list_sort_test: list corrupted\n");
goto exit;
}
if (cmp_result > 0) {
- printk(KERN_ERR "list_sort() failed to sort!\n");
+ printk(KERN_ERR "list_sort_test: failed to sort\n");
goto exit;
}
el = container_of(cur, struct debug_el, list);
el_next = container_of(cur->next, struct debug_el, list);
if (cmp_result == 0 && el->serial >= el_next->serial) {
- printk(KERN_ERR "list_sort() failed to preserve order "
- "of equivalent elements!\n");
+ printk(KERN_ERR "list_sort_test: failed to preserve"
+ " order of equivalent elements\n");
goto exit;
}
count++;
}
if (count != LIST_SORT_TEST_LENGTH) {
- printk(KERN_ERR "list_sort() returned list of "
- "different length!\n");
+ printk(KERN_ERR "list_sort_test: list length changed\n");
goto exit;
}
err = 0;


\
 
 \ /
  Last update: 2010-08-24 18:07    [from the cache]
©2003-2011 Jasper Spaans