All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] MIPS: in plat_time_init() t reaches -1, tested: 0
@ 2009-01-31 11:23 Roel Kluin
  2009-02-04 21:15 ` Ralf Baechle
  0 siblings, 1 reply; 2+ messages in thread
From: Roel Kluin @ 2009-01-31 11:23 UTC (permalink / raw)
  To: mano, ralf; +Cc: linux-mips

With a postfix decrement t reaches -1 rather than 0,
so the fall-back will not occur.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/arch/mips/alchemy/common/time.c b/arch/mips/alchemy/common/time.c
index 3288014..0b5681a 100644
--- a/arch/mips/alchemy/common/time.c
+++ b/arch/mips/alchemy/common/time.c
@@ -118,7 +118,7 @@ void __init plat_time_init(void)
 	 * setup counter 1 (RTC) to tick at full speed
 	 */
 	t = 0xffffff;
-	while ((au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_T1S) && t--)
+	while ((au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_T1S) && --t)
 		asm volatile ("nop");
 	if (!t)
 		goto cntr_err;
@@ -127,7 +127,7 @@ void __init plat_time_init(void)
 	au_sync();
 
 	t = 0xffffff;
-	while ((au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_C1S) && t--)
+	while ((au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_C1S) && --t)
 		asm volatile ("nop");
 	if (!t)
 		goto cntr_err;
@@ -135,7 +135,7 @@ void __init plat_time_init(void)
 	au_sync();
 
 	t = 0xffffff;
-	while ((au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_C1S) && t--)
+	while ((au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_C1S) && --t)
 		asm volatile ("nop");
 	if (!t)
 		goto cntr_err;

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

* Re: [PATCH] MIPS: in plat_time_init() t reaches -1, tested: 0
  2009-01-31 11:23 [PATCH] MIPS: in plat_time_init() t reaches -1, tested: 0 Roel Kluin
@ 2009-02-04 21:15 ` Ralf Baechle
  0 siblings, 0 replies; 2+ messages in thread
From: Ralf Baechle @ 2009-02-04 21:15 UTC (permalink / raw)
  To: Roel Kluin; +Cc: mano, linux-mips

On Sat, Jan 31, 2009 at 12:23:34PM +0100, Roel Kluin wrote:

> With a postfix decrement t reaches -1 rather than 0,
> so the fall-back will not occur.

Thanks, applied.

  Ralf

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

end of thread, other threads:[~2009-02-04 21:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-31 11:23 [PATCH] MIPS: in plat_time_init() t reaches -1, tested: 0 Roel Kluin
2009-02-04 21:15 ` Ralf Baechle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.