lkml.org 
[lkml]   [2007]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectKilling printk calls for size (Re: [PATCH] [6/50] i386: clean up oops/bug reports)
Date
From
* 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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-09-22 04:37    [W:0.356 / U:0.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site