summaryrefslogtreecommitdiffstats
path: root/lib/bug.c
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2014-06-04 16:11:59 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-04 16:54:19 -0700
commitc56ba70331d9f3c1ea77f8053095fb05fe773f50 (patch)
treee397ee39facb5fb7697508ade79083bcfc5a5324 /lib/bug.c
parentce643a30d1c8bd31b6310f59f6d7236c9904c3bf (diff)
downloadop-kernel-dev-c56ba70331d9f3c1ea77f8053095fb05fe773f50.zip
op-kernel-dev-c56ba70331d9f3c1ea77f8053095fb05fe773f50.tar.gz
lib/bug.c: convert printk to pr_foo()
- Coalesce formats - "WARNING:" prefix unchanged to keep bug format. - printk(KERN_DEFAULT not converted. - define pr_fmt without prefix to avoid any default prefix update (suggested by Joe Perches). Signed-off-by: Fabian Frederick <fabf@skynet.be> Cc: Jeremy Fitzhardinge <jeremy@goop.org> Cc: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib/bug.c')
-rw-r--r--lib/bug.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/lib/bug.c b/lib/bug.c
index 1686034..d1d7c78 100644
--- a/lib/bug.c
+++ b/lib/bug.c
@@ -37,6 +37,9 @@
Jeremy Fitzhardinge <jeremy@goop.org> 2006
*/
+
+#define pr_fmt(fmt) fmt
+
#include <linux/list.h>
#include <linux/module.h>
#include <linux/kernel.h>
@@ -153,15 +156,13 @@ enum bug_trap_type report_bug(unsigned long bugaddr, struct pt_regs *regs)
if (warning) {
/* this is a WARN_ON rather than BUG/BUG_ON */
- printk(KERN_WARNING "------------[ cut here ]------------\n");
+ pr_warn("------------[ cut here ]------------\n");
if (file)
- printk(KERN_WARNING "WARNING: at %s:%u\n",
- file, line);
+ pr_warn("WARNING: at %s:%u\n", file, line);
else
- printk(KERN_WARNING "WARNING: at %p "
- "[verbose debug info unavailable]\n",
- (void *)bugaddr);
+ pr_warn("WARNING: at %p [verbose debug info unavailable]\n",
+ (void *)bugaddr);
print_modules();
show_regs(regs);
@@ -174,12 +175,10 @@ enum bug_trap_type report_bug(unsigned long bugaddr, struct pt_regs *regs)
printk(KERN_DEFAULT "------------[ cut here ]------------\n");
if (file)
- printk(KERN_CRIT "kernel BUG at %s:%u!\n",
- file, line);
+ pr_crit("kernel BUG at %s:%u!\n", file, line);
else
- printk(KERN_CRIT "Kernel BUG at %p "
- "[verbose debug info unavailable]\n",
- (void *)bugaddr);
+ pr_crit("Kernel BUG at %p [verbose debug info unavailable]\n",
+ (void *)bugaddr);
return BUG_TRAP_TYPE_BUG;
}
OpenPOWER on IntegriCloud