Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH][MIPS] merge a few printk in check_wait()
@ 2006-10-18 15:27 Yoichi Yuasa
  2006-10-18 16:00 ` Franck Bui-Huu
  0 siblings, 1 reply; 7+ messages in thread
From: Yoichi Yuasa @ 2006-10-18 15:27 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: yoichi_yuasa, linux-mips

Hi Ralf,

This patch has merged a few printk in check_wait().

Yoichi

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>

diff -pruN -X mips/Documentation/dontdiff mips-orig/arch/mips/kernel/cpu-probe.c mips/arch/mips/kernel/cpu-probe.c
--- mips-orig/arch/mips/kernel/cpu-probe.c	2006-10-18 10:20:24.397574000 +0900
+++ mips/arch/mips/kernel/cpu-probe.c	2006-10-18 10:28:53.113366750 +0900
@@ -120,11 +120,9 @@ static inline void check_wait(void)
 	case CPU_R3081:
 	case CPU_R3081E:
 		cpu_wait = r3081_wait;
-		printk(" available.\n");
 		break;
 	case CPU_TX3927:
 		cpu_wait = r39xx_wait;
-		printk(" available.\n");
 		break;
 	case CPU_R4200:
 /*	case CPU_R4300: */
@@ -146,35 +144,30 @@ static inline void check_wait(void)
 	case CPU_74K:
  	case CPU_PR4450:
 		cpu_wait = r4k_wait;
-		printk(" available.\n");
 		break;
 	case CPU_TX49XX:
 		cpu_wait = r4k_wait_irqoff;
-		printk(" available.\n");
 		break;
 	case CPU_AU1000:
 	case CPU_AU1100:
 	case CPU_AU1500:
 	case CPU_AU1550:
 	case CPU_AU1200:
-		if (allow_au1k_wait) {
+		if (allow_au1k_wait)
 			cpu_wait = au1k_wait;
-			printk(" available.\n");
-		} else
-			printk(" unavailable.\n");
 		break;
 	case CPU_RM9000:
-		if ((c->processor_id & 0x00ff) >= 0x40) {
+		if ((c->processor_id & 0x00ff) >= 0x40)
 			cpu_wait = r4k_wait;
-			printk(" available.\n");
-		} else {
-			printk(" unavailable.\n");
-		}
 		break;
 	default:
-		printk(" unavailable.\n");
 		break;
 	}
+
+	if (cpu_wait)
+		printk(" available.\n");
+	else
+		printk(" unavailable.\n");
 }
 
 void __init check_bugs32(void)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH][MIPS] merge a few printk in check_wait()
  2006-10-18 15:27 [PATCH][MIPS] merge a few printk in check_wait() Yoichi Yuasa
@ 2006-10-18 16:00 ` Franck Bui-Huu
  2006-10-18 16:15   ` Ralf Baechle
  0 siblings, 1 reply; 7+ messages in thread
From: Franck Bui-Huu @ 2006-10-18 16:00 UTC (permalink / raw)
  To: Yoichi Yuasa; +Cc: Ralf Baechle, linux-mips

Hi,

Yoichi Yuasa wrote:
> Hi Ralf,
> 
> This patch has merged a few printk in check_wait().
> 
> Yoichi
> 
> Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
> 
> diff -pruN -X mips/Documentation/dontdiff mips-orig/arch/mips/kernel/cpu-probe.c mips/arch/mips/kernel/cpu-probe.c
> --- mips-orig/arch/mips/kernel/cpu-probe.c	2006-10-18 10:20:24.397574000 +0900
> +++ mips/arch/mips/kernel/cpu-probe.c	2006-10-18 10:28:53.113366750 +0900
> @@ -120,11 +120,9 @@ static inline void check_wait(void)

does it really need to be inlined ?

>  	case CPU_R3081:
[snip]
> +
> +	if (cpu_wait)
> +		printk(" available.\n");
> +	else
> +		printk(" unavailable.\n");

what about:

	printk(" %savailable.\n", cpu_wait ? "" : "un");


		Franck

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH][MIPS] merge a few printk in check_wait()
  2006-10-18 16:00 ` Franck Bui-Huu
@ 2006-10-18 16:15   ` Ralf Baechle
  2006-10-19  8:07     ` Yoichi Yuasa
  0 siblings, 1 reply; 7+ messages in thread
From: Ralf Baechle @ 2006-10-18 16:15 UTC (permalink / raw)
  To: Franck Bui-Huu; +Cc: Yoichi Yuasa, linux-mips

On Wed, Oct 18, 2006 at 06:00:02PM +0200, Franck Bui-Huu wrote:

> 
> 	printk(" %savailable.\n", cpu_wait ? "" : "un");

Or more radical, just getting rid of the printk entirely?  It doesn't
provide very useful information.

  Ralf

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH][MIPS] merge a few printk in check_wait()
  2006-10-18 16:15   ` Ralf Baechle
@ 2006-10-19  8:07     ` Yoichi Yuasa
  2006-10-19 16:54       ` Maciej W. Rozycki
  0 siblings, 1 reply; 7+ messages in thread
From: Yoichi Yuasa @ 2006-10-19  8:07 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: yoichi_yuasa, vagabon.xyz, linux-mips

On Wed, 18 Oct 2006 17:15:52 +0100
Ralf Baechle <ralf@linux-mips.org> wrote:

> On Wed, Oct 18, 2006 at 06:00:02PM +0200, Franck Bui-Huu wrote:
> 
> > 
> > 	printk(" %savailable.\n", cpu_wait ? "" : "un");
> 
> Or more radical, just getting rid of the printk entirely?  It doesn't
> provide very useful information.
> 
>   Ralf
> 

I agree with you.
I updated my patch.

Yoichi

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>

diff -pruN -X mips/Documentation/dontdiff mips-orig/arch/mips/kernel/cpu-probe.c mips/arch/mips/kernel/cpu-probe.c
--- mips-orig/arch/mips/kernel/cpu-probe.c	2006-10-19 10:27:36.246613000 +0900
+++ mips/arch/mips/kernel/cpu-probe.c	2006-10-19 10:28:08.504629000 +0900
@@ -120,11 +120,9 @@ static inline void check_wait(void)
 	case CPU_R3081:
 	case CPU_R3081E:
 		cpu_wait = r3081_wait;
-		printk(" available.\n");
 		break;
 	case CPU_TX3927:
 		cpu_wait = r39xx_wait;
-		printk(" available.\n");
 		break;
 	case CPU_R4200:
 /*	case CPU_R4300: */
@@ -146,33 +144,23 @@ static inline void check_wait(void)
 	case CPU_74K:
  	case CPU_PR4450:
 		cpu_wait = r4k_wait;
-		printk(" available.\n");
 		break;
 	case CPU_TX49XX:
 		cpu_wait = r4k_wait_irqoff;
-		printk(" available.\n");
 		break;
 	case CPU_AU1000:
 	case CPU_AU1100:
 	case CPU_AU1500:
 	case CPU_AU1550:
 	case CPU_AU1200:
-		if (allow_au1k_wait) {
+		if (allow_au1k_wait)
 			cpu_wait = au1k_wait;
-			printk(" available.\n");
-		} else
-			printk(" unavailable.\n");
 		break;
 	case CPU_RM9000:
-		if ((c->processor_id & 0x00ff) >= 0x40) {
+		if ((c->processor_id & 0x00ff) >= 0x40)
 			cpu_wait = r4k_wait;
-			printk(" available.\n");
-		} else {
-			printk(" unavailable.\n");
-		}
 		break;
 	default:
-		printk(" unavailable.\n");
 		break;
 	}
 }

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH][MIPS] merge a few printk in check_wait()
  2006-10-19  8:07     ` Yoichi Yuasa
@ 2006-10-19 16:54       ` Maciej W. Rozycki
  2006-10-19 17:48         ` Ralf Baechle
  0 siblings, 1 reply; 7+ messages in thread
From: Maciej W. Rozycki @ 2006-10-19 16:54 UTC (permalink / raw)
  To: Yoichi Yuasa; +Cc: Ralf Baechle, vagabon.xyz, linux-mips

On Thu, 19 Oct 2006, Yoichi Yuasa wrote:

> > Or more radical, just getting rid of the printk entirely?  It doesn't
> > provide very useful information.
[...]
> I agree with you.
> I updated my patch.

 You might consider removing "Checking for..." in that case as well.

  Maciej

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH][MIPS] merge a few printk in check_wait()
  2006-10-19 16:54       ` Maciej W. Rozycki
@ 2006-10-19 17:48         ` Ralf Baechle
  2006-10-19 22:10           ` Yoichi Yuasa
  0 siblings, 1 reply; 7+ messages in thread
From: Ralf Baechle @ 2006-10-19 17:48 UTC (permalink / raw)
  To: Maciej W. Rozycki; +Cc: Yoichi Yuasa, vagabon.xyz, linux-mips

On Thu, Oct 19, 2006 at 05:54:19PM +0100, Maciej W. Rozycki wrote:

> 
> > > Or more radical, just getting rid of the printk entirely?  It doesn't
> > > provide very useful information.
> [...]
> > I agree with you.
> > I updated my patch.
> 
>  You might consider removing "Checking for..." in that case as well.

I acutally already have such a patch on the queue tree.

  Ralf

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH][MIPS] merge a few printk in check_wait()
  2006-10-19 17:48         ` Ralf Baechle
@ 2006-10-19 22:10           ` Yoichi Yuasa
  0 siblings, 0 replies; 7+ messages in thread
From: Yoichi Yuasa @ 2006-10-19 22:10 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: yoichi_yuasa, macro, vagabon.xyz, linux-mips

On Thu, 19 Oct 2006 18:48:41 +0100
Ralf Baechle <ralf@linux-mips.org> wrote:

> On Thu, Oct 19, 2006 at 05:54:19PM +0100, Maciej W. Rozycki wrote:
> 
> > 
> > > > Or more radical, just getting rid of the printk entirely?  It doesn't
> > > > provide very useful information.
> > [...]
> > > I agree with you.
> > > I updated my patch.
> > 
> >  You might consider removing "Checking for..." in that case as well.

Oops.

> I acutally already have such a patch on the queue tree.

Thanks,

Yoichi

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-10-19 22:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-18 15:27 [PATCH][MIPS] merge a few printk in check_wait() Yoichi Yuasa
2006-10-18 16:00 ` Franck Bui-Huu
2006-10-18 16:15   ` Ralf Baechle
2006-10-19  8:07     ` Yoichi Yuasa
2006-10-19 16:54       ` Maciej W. Rozycki
2006-10-19 17:48         ` Ralf Baechle
2006-10-19 22:10           ` Yoichi Yuasa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox