Re: [PATCH 1/1] lib/bug.c: convert printk to pr_foo()

From: Joe Perches
Date: Sat May 24 2014 - 02:35:56 EST


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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/