Killing printk calls for size (Re: [PATCH] [6/50] i386: clean up oops/bug reports)

From: Oleg Verych
Date: Fri Sep 21 2007 - 22:35:41 EST


* Sat, 22 Sep 2007 00:32:04 +0200 (CEST)
[]
> arch/i386/kernel/traps.c | 16 ++++------------
> arch/i386/mm/fault.c | 13 +++++++------
> 2 files changed, 11 insertions(+), 18 deletions(-)

It seems, like size can be reduced even more now:

[]
> report_bug(regs->eip, regs);
>
> - printk(KERN_EMERG "%s: %04lx [#%d]\n", str, err & 0xffff, ++die_counter);
> + printk(KERN_EMERG "%s: %04lx [#%d] ", str, err & 0xffff, ++die_counter);

+ printk(KERN_EMERG "%s: %04lx [#%d] %s", str, err &0xffff, ++die_counter,

> #ifdef CONFIG_PREEMPT
> - printk(KERN_EMERG "PREEMPT ");
> - nl = 1;
> + printk("PREEMPT ");

+ "PREEMPT "\

> #endif
> #ifdef CONFIG_SMP
> - if (!nl)
> - printk(KERN_EMERG);
> printk("SMP ");

"SMP "\

> - nl = 1;
> #endif
> #ifdef CONFIG_DEBUG_PAGEALLOC
> - if (!nl)
> - printk(KERN_EMERG);
> printk("DEBUG_PAGEALLOC");

"DEBUG_PAGEALLOC"\

> - nl = 1;
> #endif
> - if (nl)
> - printk("\n");
> + printk("\n");

+ "\n");

Just hand waving.

FWIW, with more flexible kconfig, ifdiffery can be removed also...
____
-
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/