Re: [PATCH] Remove multiple KERN_ prefixes from printk formats
From: Mike Frysinger
Date: Mon Jul 06 2009 - 16:24:08 EST
On Mon, Jul 6, 2009 at 16:05, Joe Perches wrote:
> commit 5fd29d6ccbc98884569d6f3105aeca70858b3e0f changed
> printk semantics. printk lines with multiple KERN_<level>
> prefixes are no longer emitted as before the patch.
>
> <level> is now included in the output on each additional use.
>
> Remove all uses of multiple KERN_<level>s in formats.
thanks, i had started this in the Blackfin code a little, but your
patch includes what i did and more, so the Blackfin stuff should be
mostly fine (pending comments below).
> --- a/arch/blackfin/kernel/traps.c
> +++ b/arch/blackfin/kernel/traps.c
> @@ -212,7 +212,7 @@ asmlinkage void double_fault_c(struct pt_regs *fp)
> Â Â Â Âconsole_verbose();
> Â Â Â Âoops_in_progress = 1;
> Â#ifdef CONFIG_DEBUG_VERBOSE
> - Â Â Â printk(KERN_EMERG "\n" KERN_EMERG "Double Fault\n");
> + Â Â Â printk(KERN_EMERG "Double Fault\n");
dropped a newline. we've largely made sure the newlines and such were
as we want in the output ... in this case, it is not a matter of
adding a newline where one did not exist before
> - Â Â Â Â Â Â Â Â Â Â Â verbose_printk(KERN_NOTICE "\n" KERN_NOTICE "Kernel Stack\n");
> + Â Â Â Â Â Â Â Â Â Â Â verbose_printk(KERN_NOTICE "Kernel Stack\n");
and here
> - Â Â Â Â Â Â Â verbose_printk(KERN_NOTICE "\n" KERN_NOTICE
> - Â Â Â Â Â Â Â Â Â Â"No Valid process in current context\n");
> + Â Â Â Â Â Â Â verbose_printk(KERN_NOTICE
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â"No Valid process in current context\n");
and here
> - Â Â Â verbose_printk(KERN_NOTICE "\n" KERN_NOTICE "SEQUENCER STATUS:\t\t%s\n", print_tainted());
> + Â Â Â verbose_printk(KERN_NOTICE "\nSEQUENCER STATUS:\t\t%s\n",
> + Â Â Â Â Â Â Â Â Â Â Âprint_tainted());
and here
> - Â Â Â verbose_printk(KERN_NOTICE "\n" KERN_NOTICE "PROCESSOR STATE:\n");
> + Â Â Â verbose_printk(KERN_NOTICE "PROCESSOR STATE:\n");
and here
-mike
--
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/