]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
idr-print-a-stack-dump-after-ida_remove-warning-fix
authorAndrew Morton <akpm@linux-foundation.org>
Wed, 19 Jun 2013 00:08:26 +0000 (10:08 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 19 Jun 2013 07:27:44 +0000 (17:27 +1000)
convert the open-coded printk+dump_stack into WARN()

Cc: Jean Delvare <jdelvare@suse.de>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/idr.c

index cee828827f6077616d08f52fb082bb4c50e6084a..bfe4db4e165f2941654e5ba551fbc8c3fe0a467c 100644 (file)
--- a/lib/idr.c
+++ b/lib/idr.c
@@ -524,9 +524,7 @@ EXPORT_SYMBOL(idr_alloc_cyclic);
 
 static void idr_remove_warning(int id)
 {
-       printk(KERN_WARNING
-               "idr_remove called for id=%d which is not allocated.\n", id);
-       dump_stack();
+       WARN(1, "idr_remove called for id=%d which is not allocated.\n", id);
 }
 
 static void sub_remove(struct idr *idp, int shift, int id)
@@ -1064,9 +1062,7 @@ void ida_remove(struct ida *ida, int id)
        return;
 
  err:
-       printk(KERN_WARNING
-              "ida_remove called for id=%d which is not allocated.\n", id);
-       dump_stack();
+       WARN(1, "ida_remove called for id=%d which is not allocated.\n", id);
 }
 EXPORT_SYMBOL(ida_remove);