lkml.org 
[lkml]   [2014]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/1] lib/bug.c: convert printk to pr_foo()
From
Date
On Sat, 2014-05-24 at 08:18 +0200, Fabian Frederick wrote:
> -Coalesce formats
> -"WARNING:" prefix unchanged to keep bug format.
> -printk(KERN_DEFAULT not converted.

Hello Fabian.

For these conversions where there is a specific
desire to _NOT_ have a prefix, can you please add
a new #define to the file?

#define pr_fmt(fmt) fmt

so that if ever the default in printk.h is changed,
these will not be prefixed.

> diff --git a/lib/bug.c b/lib/bug.c
[]
> @@ -153,15 +153,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");

Thanks, Joe



\
 
 \ /
  Last update: 2014-05-24 09:01    [W:0.039 / U:0.432 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site