* [PATCH] mpc5121/clocks: make debug output more readable
@ 2009-05-08 12:34 Wolfram Sang
2009-05-08 14:17 ` Geert Uytterhoeven
2009-05-08 15:40 ` Grant Likely
0 siblings, 2 replies; 4+ messages in thread
From: Wolfram Sang @ 2009-05-08 12:34 UTC (permalink / raw)
To: linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 1355 bytes --]
- 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(-)
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/ |
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mpc5121/clocks: make debug output more readable
2009-05-08 12:34 [PATCH] mpc5121/clocks: make debug output more readable Wolfram Sang
@ 2009-05-08 14:17 ` Geert Uytterhoeven
2009-05-08 15:40 ` Grant Likely
1 sibling, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2009-05-08 14:17 UTC (permalink / raw)
To: Wolfram Sang; +Cc: linuxppc-dev
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mpc5121/clocks: make debug output more readable
2009-05-08 12:34 [PATCH] mpc5121/clocks: make debug output more readable Wolfram Sang
2009-05-08 14:17 ` Geert Uytterhoeven
@ 2009-05-08 15:40 ` Grant Likely
2009-05-15 14:40 ` [PATCH V2] " Wolfram Sang
1 sibling, 1 reply; 4+ messages in thread
From: Grant Likely @ 2009-05-08 15:40 UTC (permalink / raw)
To: Wolfram Sang; +Cc: linuxppc-dev
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 '=3D' 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>
>
> ---
> =A0arch/powerpc/platforms/512x/clock.c | =A0 =A07 +++----
> =A01 file changed, 3 insertions(+), 4 deletions(-)
>
> Index: .kernel/arch/powerpc/platforms/512x/clock.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- .kernel.orig/arch/powerpc/platforms/512x/clock.c
> +++ .kernel/arch/powerpc/platforms/512x/clock.c
> @@ -83,12 +83,11 @@ static void dump_clocks(void)
> =A0 =A0 =A0 =A0mutex_lock(&clocks_mutex);
> =A0 =A0 =A0 =A0printk(KERN_INFO "CLOCKS:\n");
> =A0 =A0 =A0 =A0list_for_each_entry(p, &clocks, node) {
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 printk(KERN_INFO " =A0%s %ld", p->name, p->=
rate);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 printk(KERN_INFO " =A0%s=3D%ld", p->name, p=
->rate);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (p->parent)
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 printk(KERN_INFO " %s %ld",=
p->parent->name,
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0p->parent->r=
ate);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 printk(" %s=3D%ld", p->pare=
nt->name, p->parent->rate);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (p->flags & CLK_HAS_CTRL)
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 printk(KERN_INFO " reg/bit =
%d/%d", p->reg, p->bit);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 printk(" reg/bit=3D%d/%d", =
p->reg, p->bit);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0printk("\n");
> =A0 =A0 =A0 =A0}
> =A0 =A0 =A0 =A0mutex_unlock(&clocks_mutex);
>
> --
> Pengutronix e.K. =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | Wo=
lfram Sang =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0|
> Industrial Linux Solutions =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | http://www.p=
engutronix.de/ =A0|
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iEYEARECAAYFAkoEJsUACgkQD27XaX1/VRuQggCgm7auPJpCpTVleUD30B86X/jW
> lZsAnR91XB0YVCBp95aGyEqUU8+LXaHv
> =3D6IcQ
> -----END PGP SIGNATURE-----
>
>
--=20
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH V2] mpc5121/clocks: make debug output more readable
2009-05-08 15:40 ` Grant Likely
@ 2009-05-15 14:40 ` Wolfram Sang
0 siblings, 0 replies; 4+ messages in thread
From: Wolfram Sang @ 2009-05-15 14:40 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 1308 bytes --]
- refactor printk with pr_info/pr_cont
- 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 | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Index: arch/powerpc/platforms/512x/clock.c
===================================================================
--- arch/powerpc/platforms/512x/clock.c.orig
+++ arch/powerpc/platforms/512x/clock.c
@@ -83,13 +83,13 @@ 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);
+ pr_info(" %s=%ld", p->name, p->rate);
if (p->parent)
- printk(KERN_INFO " %s %ld", p->parent->name,
+ pr_cont(" %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("\n");
+ pr_cont(" reg/bit=%d/%d", p->reg, p->bit);
+ pr_cont("\n");
}
mutex_unlock(&clocks_mutex);
}
--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-05-15 14:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-08 12:34 [PATCH] mpc5121/clocks: make debug output more readable Wolfram Sang
2009-05-08 14:17 ` Geert Uytterhoeven
2009-05-08 15:40 ` Grant Likely
2009-05-15 14:40 ` [PATCH V2] " Wolfram Sang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).