diff options
Diffstat (limited to 'lib/debugobjects.c')
-rw-r--r-- | lib/debugobjects.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/lib/debugobjects.c b/lib/debugobjects.c index f86196390cfd..45a6bde762d1 100644 --- a/lib/debugobjects.c +++ b/lib/debugobjects.c | |||
@@ -205,9 +205,8 @@ static void debug_print_object(struct debug_obj *obj, char *msg) | |||
205 | 205 | ||
206 | if (limit < 5 && obj->descr != descr_test) { | 206 | if (limit < 5 && obj->descr != descr_test) { |
207 | limit++; | 207 | limit++; |
208 | printk(KERN_ERR "ODEBUG: %s %s object type: %s\n", msg, | 208 | WARN(1, KERN_ERR "ODEBUG: %s %s object type: %s\n", msg, |
209 | obj_states[obj->state], obj->descr->name); | 209 | obj_states[obj->state], obj->descr->name); |
210 | WARN_ON(1); | ||
211 | } | 210 | } |
212 | debug_objects_warnings++; | 211 | debug_objects_warnings++; |
213 | } | 212 | } |
@@ -733,26 +732,22 @@ check_results(void *addr, enum debug_obj_state state, int fixups, int warnings) | |||
733 | 732 | ||
734 | obj = lookup_object(addr, db); | 733 | obj = lookup_object(addr, db); |
735 | if (!obj && state != ODEBUG_STATE_NONE) { | 734 | if (!obj && state != ODEBUG_STATE_NONE) { |
736 | printk(KERN_ERR "ODEBUG: selftest object not found\n"); | 735 | WARN(1, KERN_ERR "ODEBUG: selftest object not found\n"); |
737 | WARN_ON(1); | ||
738 | goto out; | 736 | goto out; |
739 | } | 737 | } |
740 | if (obj && obj->state != state) { | 738 | if (obj && obj->state != state) { |
741 | printk(KERN_ERR "ODEBUG: selftest wrong state: %d != %d\n", | 739 | WARN(1, KERN_ERR "ODEBUG: selftest wrong state: %d != %d\n", |
742 | obj->state, state); | 740 | obj->state, state); |
743 | WARN_ON(1); | ||
744 | goto out; | 741 | goto out; |
745 | } | 742 | } |
746 | if (fixups != debug_objects_fixups) { | 743 | if (fixups != debug_objects_fixups) { |
747 | printk(KERN_ERR "ODEBUG: selftest fixups failed %d != %d\n", | 744 | WARN(1, KERN_ERR "ODEBUG: selftest fixups failed %d != %d\n", |
748 | fixups, debug_objects_fixups); | 745 | fixups, debug_objects_fixups); |
749 | WARN_ON(1); | ||
750 | goto out; | 746 | goto out; |
751 | } | 747 | } |
752 | if (warnings != debug_objects_warnings) { | 748 | if (warnings != debug_objects_warnings) { |
753 | printk(KERN_ERR "ODEBUG: selftest warnings failed %d != %d\n", | 749 | WARN(1, KERN_ERR "ODEBUG: selftest warnings failed %d != %d\n", |
754 | warnings, debug_objects_warnings); | 750 | warnings, debug_objects_warnings); |
755 | WARN_ON(1); | ||
756 | goto out; | 751 | goto out; |
757 | } | 752 | } |
758 | res = 0; | 753 | res = 0; |