linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] MIPS: Initialize an atomic_t properly with ATOMIC_INIT(0).
@ 2010-02-27 17:02 Robert P. J. Day
  2010-03-11 10:06 ` Ralf Baechle
  0 siblings, 1 reply; 2+ messages in thread
From: Robert P. J. Day @ 2010-02-27 17:02 UTC (permalink / raw)
  To: linux-mips


Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>

---

  AFAIK, the technically correct way to initialize atomic variables is
with ATOMIC_INIT(n).


diff --git a/arch/mips/kernel/smtc.c b/arch/mips/kernel/smtc.c
index 23499b5..0a5ad2d 100644
--- a/arch/mips/kernel/smtc.c
+++ b/arch/mips/kernel/smtc.c
@@ -181,7 +181,7 @@ static int vpemask[2][8] = {
 	{0, 0, 0, 0, 0, 0, 0, 1}
 };
 int tcnoprog[NR_CPUS];
-static atomic_t idle_hook_initialized = {0};
+static atomic_t idle_hook_initialized = ATOMIC_INIT(0);
 static int clock_hang_reported[NR_CPUS];

 #endif /* CONFIG_SMTC_IDLE_HOOK_DEBUG */

========================================================================
Robert P. J. Day                               Waterloo, Ontario, CANADA

            Linux Consulting, Training and Kernel Pedantry.

Web page:                                          http://crashcourse.ca
Twitter:                                       http://twitter.com/rpjday
========================================================================

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

* Re: [PATCH] MIPS: Initialize an atomic_t properly with ATOMIC_INIT(0).
  2010-02-27 17:02 [PATCH] MIPS: Initialize an atomic_t properly with ATOMIC_INIT(0) Robert P. J. Day
@ 2010-03-11 10:06 ` Ralf Baechle
  0 siblings, 0 replies; 2+ messages in thread
From: Ralf Baechle @ 2010-03-11 10:06 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: linux-mips

On Sat, Feb 27, 2010 at 12:02:51PM -0500, Robert P. J. Day wrote:

>   AFAIK, the technically correct way to initialize atomic variables is
> with ATOMIC_INIT(n).

Indeed, applied.

Thanks!

  Ralf

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

end of thread, other threads:[~2010-03-11 10:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-27 17:02 [PATCH] MIPS: Initialize an atomic_t properly with ATOMIC_INIT(0) Robert P. J. Day
2010-03-11 10:06 ` Ralf Baechle

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).