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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux