Received: from milmhbs1.lsil.com (147.145.21.209) by coscas01.lsi.com
 (172.21.36.60) with Microsoft SMTP Server id 8.1.393.1; Sat, 27 Feb 2010
 10:05:05 -0700
Received: from mail2.lsil.com (mail2.lsil.com [147.145.40.22])	by
 milmhbs1.lsil.com (8.12.11/8.12.11) with ESMTP id o1RH559O007454	for
 <andy.sharp@lsi.com>; Sat, 27 Feb 2010 09:05:05 -0800
Received: from psmtp.com (na3sys009amx255.postini.com [74.125.149.139])	by
 mail2.lsil.com (8.12.11/8.12.11) with SMTP id o1RH04K1021676	for
 <andy.sharp@lsi.com>; Sat, 27 Feb 2010 09:00:04 -0800 (PST)
Received: from source ([78.24.191.182]) by na3sys009amx255.postini.com
 ([74.125.148.14]) with SMTP;	Sat, 27 Feb 2010 17:05:03 GMT
Received: from localhost.localdomain ([127.0.0.1]:51397 "EHLO
        eddie.linux-mips.org" rhost-flags-OK-OK-OK-FAIL)        by
 eddie.linux-mips.org with ESMTP id S1492286Ab0B0REu (ORCPT
        <rfc822;andy.sharp@lsi.com>); Sat, 27 Feb 2010 18:04:50 +0100
Received: with ECARTIS (v1.0.0; list linux-mips); Sat, 27 Feb 2010 18:04:32
 +0100 (CET)
Received: from astoria.ccjclearline.com ([64.235.106.9]:52342 "EHLO
        astoria.ccjclearline.com" rhost-flags-OK-OK-OK-OK)        by
 eddie.linux-mips.org with ESMTP id S1492215Ab0B0RE3 (ORCPT
        <rfc822;linux-mips@linux-mips.org>); Sat, 27 Feb 2010 18:04:29 +0100
Received: from cpe002129c56f16-cm001ceab6425a.cpe.net.cable.rogers.com
 ([99.235.238.149] helo=crashcourse.ca)        by astoria.ccjclearline.com
 with esmtpsa (TLSv1:AES256-SHA:256)        (Exim 4.69)        (envelope-from
 <rpjday@crashcourse.ca>)        id 1NlQ5W-0004a7-AA        for
 linux-mips@linux-mips.org; Sat, 27 Feb 2010 12:04:22 -0500
From: "Robert P. J. Day" <rpjday@crashcourse.ca>
To: "linux-mips@linux-mips.org" <linux-mips@linux-mips.org>
Sender: "linux-mips-bounce@linux-mips.org" <linux-mips-bounce@linux-mips.org>
Date: Sat, 27 Feb 2010 10:02:51 -0700
Subject: [PATCH] MIPS: Initialize an atomic_t properly with ATOMIC_INIT(0).
Thread-Topic: [PATCH] MIPS: Initialize an atomic_t properly with
 ATOMIC_INIT(0).
Thread-Index: Acq3zwJ53ctRNo33R6y/2XpG+blWkA==
Message-ID: <alpine.LFD.2.00.1002271201230.20373@localhost>
Accept-Language: en-US
Content-Language: en-US
X-MS-Exchange-Organization-AuthAs: Anonymous
X-MS-Exchange-Organization-AuthSource: coscas01.lsi.com
X-MS-Has-Attach:
X-Auto-Response-Suppress: All
X-MS-TNEF-Correlator:
x-scanned-by: MIMEDefang 2.39
errors-to: linux-mips-bounce@linux-mips.org
x-pstn-levels: (S:21.02842/99.90000 CV:99.9000 FC:95.5390 LC:95.5390
 R:95.9108 P:95.9108 M:97.0282 C:98.6951 )
x-pstn-settings: 3 (1.0000:1.0000) s cv gt3 gt2 gt1 r p m c 
x-pstn-addresses: from <rpjday@crashcourse.ca> [22/1] 
x-pstn-neptune: 0/0/0.00/0
user-agent: Alpine 2.00 (LFD 1167 2008-08-23)
x-antiabuse: Sender Address Domain - crashcourse.ca
x-source:
x-source-args:
x-source-dir:
x-x-sender: rpjday@localhost
x-list: linux-mips
x-original-sender: rpjday@crashcourse.ca
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0


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] =3D {
 	{0, 0, 0, 0, 0, 0, 0, 1}
 };
 int tcnoprog[NR_CPUS];
-static atomic_t idle_hook_initialized =3D {0};
+static atomic_t idle_hook_initialized =3D ATOMIC_INIT(0);
 static int clock_hang_reported[NR_CPUS];

 #endif /* CONFIG_SMTC_IDLE_HOOK_DEBUG */

=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=3D=3D=3D=3D=3D
Robert P. J. Day                               Waterloo, Ontario, CANADA

            Linux Consulting, Training and Kernel Pedantry.

Web page:                                          http://crashcourse.ca
Twitter:                                       http://twitter.com/rpjday
=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=3D=3D=3D=3D=3D

