From: "Robert P. J. Day" <rpjday@crashcourse.ca>
To: linux-mips@linux-mips.org
Subject: [PATCH] MIPS: Initialize an atomic_t properly with ATOMIC_INIT(0).
Date: Sat, 27 Feb 2010 12:02:51 -0500 (EST) [thread overview]
Message-ID: <alpine.LFD.2.00.1002271201230.20373@localhost> (raw)
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
========================================================================
next reply other threads:[~2010-02-27 17:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-27 17:02 Robert P. J. Day [this message]
2010-03-11 10:06 ` [PATCH] MIPS: Initialize an atomic_t properly with ATOMIC_INIT(0) Ralf Baechle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.2.00.1002271201230.20373@localhost \
--to=rpjday@crashcourse.ca \
--cc=linux-mips@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox