Patchwork mpc5121/clocks: make debug output more readable

login
register
mail settings
Submitter Wolfram Sang
Date May 8, 2009, 12:34 p.m.
Message ID <20090508123413.GC3100@pengutronix.de>
Download mbox | patch
Permalink /patch/26992/
State Changes Requested
Delegated to: Grant Likely
Headers show

Comments

Wolfram Sang - May 8, 2009, 12:34 p.m.
- Drop KERN_ levels for printks which print to the same line
- use '=' in output to connect key/value pairs

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: John Rigby <jcrigby@gmail.com>
Cc: Grant Likely <grant.likely@secretlab.ca>

---
 arch/powerpc/platforms/512x/clock.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
Geert Uytterhoeven - May 8, 2009, 2:17 p.m.
On Fri, 8 May 2009, Wolfram Sang wrote:
> - Drop KERN_ levels for printks which print to the same line

Those should use KERN_CONT nowadays.

> - use '=' in output to connect key/value pairs
> 
> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
> Cc: John Rigby <jcrigby@gmail.com>
> Cc: Grant Likely <grant.likely@secretlab.ca>
> 
> ---
>  arch/powerpc/platforms/512x/clock.c |    7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> Index: .kernel/arch/powerpc/platforms/512x/clock.c
> ===================================================================
> --- .kernel.orig/arch/powerpc/platforms/512x/clock.c
> +++ .kernel/arch/powerpc/platforms/512x/clock.c
> @@ -83,12 +83,11 @@ static void dump_clocks(void)
>  	mutex_lock(&clocks_mutex);
>  	printk(KERN_INFO "CLOCKS:\n");
>  	list_for_each_entry(p, &clocks, node) {
> -		printk(KERN_INFO "  %s %ld", p->name, p->rate);
> +		printk(KERN_INFO "  %s=%ld", p->name, p->rate);
>  		if (p->parent)
> -			printk(KERN_INFO " %s %ld", p->parent->name,
> -			       p->parent->rate);
> +			printk(" %s=%ld", p->parent->name, p->parent->rate);
>  		if (p->flags & CLK_HAS_CTRL)
> -			printk(KERN_INFO " reg/bit %d/%d", p->reg, p->bit);
> +			printk(" reg/bit=%d/%d", p->reg, p->bit);
                               ^
			       KERN_CONT

>  		printk("\n");
>  	}
>  	mutex_unlock(&clocks_mutex);

With kind regards,

Geert Uytterhoeven
Software Architect
Techsoft Centre

Technology and Software Centre Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

Phone:    +32 (0)2 700 8453
Fax:      +32 (0)2 700 8622
E-mail:   Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/

A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis · BIC GEBABEBB · IBAN BE41293037680010
Grant Likely - May 8, 2009, 3:40 p.m.
On Fri, May 8, 2009 at 6:34 AM, Wolfram Sang <w.sang@pengutronix.de> wrote:
>
> - Drop KERN_ levels for printks which print to the same line
> - use '=' in output to connect key/value pairs

Personally, I'd rather see the printks converted to pr_info()/pr_cont().

g.

>
> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
> Cc: John Rigby <jcrigby@gmail.com>
> Cc: Grant Likely <grant.likely@secretlab.ca>
>
> ---
>  arch/powerpc/platforms/512x/clock.c |    7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
>
> Index: .kernel/arch/powerpc/platforms/512x/clock.c
> ===================================================================
> --- .kernel.orig/arch/powerpc/platforms/512x/clock.c
> +++ .kernel/arch/powerpc/platforms/512x/clock.c
> @@ -83,12 +83,11 @@ static void dump_clocks(void)
>        mutex_lock(&clocks_mutex);
>        printk(KERN_INFO "CLOCKS:\n");
>        list_for_each_entry(p, &clocks, node) {
> -               printk(KERN_INFO "  %s %ld", p->name, p->rate);
> +               printk(KERN_INFO "  %s=%ld", p->name, p->rate);
>                if (p->parent)
> -                       printk(KERN_INFO " %s %ld", p->parent->name,
> -                              p->parent->rate);
> +                       printk(" %s=%ld", p->parent->name, p->parent->rate);
>                if (p->flags & CLK_HAS_CTRL)
> -                       printk(KERN_INFO " reg/bit %d/%d", p->reg, p->bit);
> +                       printk(" reg/bit=%d/%d", p->reg, p->bit);
>                printk("\n");
>        }
>        mutex_unlock(&clocks_mutex);
>
> --
> Pengutronix e.K.                           | Wolfram Sang                |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iEYEARECAAYFAkoEJsUACgkQD27XaX1/VRuQggCgm7auPJpCpTVleUD30B86X/jW
> lZsAnR91XB0YVCBp95aGyEqUU8+LXaHv
> =6IcQ
> -----END PGP SIGNATURE-----
>
>

Patch

Index: .kernel/arch/powerpc/platforms/512x/clock.c
===================================================================
--- .kernel.orig/arch/powerpc/platforms/512x/clock.c
+++ .kernel/arch/powerpc/platforms/512x/clock.c
@@ -83,12 +83,11 @@  static void dump_clocks(void)
 	mutex_lock(&clocks_mutex);
 	printk(KERN_INFO "CLOCKS:\n");
 	list_for_each_entry(p, &clocks, node) {
-		printk(KERN_INFO "  %s %ld", p->name, p->rate);
+		printk(KERN_INFO "  %s=%ld", p->name, p->rate);
 		if (p->parent)
-			printk(KERN_INFO " %s %ld", p->parent->name,
-			       p->parent->rate);
+			printk(" %s=%ld", p->parent->name, p->parent->rate);
 		if (p->flags & CLK_HAS_CTRL)
-			printk(KERN_INFO " reg/bit %d/%d", p->reg, p->bit);
+			printk(" reg/bit=%d/%d", p->reg, p->bit);
 		printk("\n");
 	}
 	mutex_unlock(&clocks_mutex);