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; Mon, 23 Nov 2009
 04:54:50 -0700
Received: from mail1.lsil.com (mail1.lsil.com [147.145.40.21])	by
 milmhbs1.lsil.com (8.12.11/8.12.11) with ESMTP id nANBsoaA009884	for
 <andy.sharp@lsi.com>; Mon, 23 Nov 2009 03:54:50 -0800
Received: from psmtp.com (na3sys009amx230.postini.com [74.125.149.114])	by
 mail1.lsil.com (8.12.11/8.12.11) with SMTP id nANBsmwZ029514	for
 <andy.sharp@lsi.com>; Mon, 23 Nov 2009 03:54:49 -0800 (PST)
Received: from source ([78.24.191.182]) by na3sys009amx230.postini.com
 ([74.125.148.14]) with SMTP;	Mon, 23 Nov 2009 03:54:49 PST
Received: from localhost.localdomain ([127.0.0.1]:51391 "EHLO
	eddie.linux-mips.org" rhost-flags-OK-OK-OK-FAIL) by ftp.linux-mips.org	with
 ESMTP id S1493021AbZKWLyo (ORCPT <rfc822;andy.sharp@lsi.com>);	Mon, 23 Nov
 2009 12:54:44 +0100
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 23 Nov 2009 12:54:26
 +0100 (CET)
Received: from gw02.mail.saunalahti.fi ([195.197.172.116]:55453 "EHLO
	gw02.mail.saunalahti.fi" rhost-flags-OK-OK-OK-OK)	by ftp.linux-mips.org with
 ESMTP id S1492988AbZKWLyT (ORCPT	<rfc822;linux-mips@linux-mips.org>); Mon, 23
 Nov 2009 12:54:19 +0100
Received: from localhost.localdomain (a88-114-232-190.elisa-laajakaista.fi
 [88.114.232.190])	by gw02.mail.saunalahti.fi (Postfix) with ESMTP id
 22E211397CB;	Mon, 23 Nov 2009 13:54:14 +0200 (EET)
From: Dmitri Vorobiev <dmitri.vorobiev@movial.com>
To: "linux-mips@linux-mips.org" <linux-mips@linux-mips.org>,
	"ralf@linux-mips.org" <ralf@linux-mips.org>
CC: Dmitri Vorobiev <dmitri.vorobiev@movial.com>
Sender: "linux-mips-bounce@linux-mips.org" <linux-mips-bounce@linux-mips.org>
Date: Mon, 23 Nov 2009 04:53:37 -0700
Subject: [PATCH] [MIPS] Move several variables from .bss to .init.data
Thread-Topic: [PATCH] [MIPS] Move several variables from .bss to .init.data
Thread-Index: AcpsM8OfAYsKpKTzRnu7v60ql1tQXQ==
Message-ID: <1258977217-25461-1-git-send-email-dmitri.vorobiev@movial.com>
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:96.17501/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 <dmitri.vorobiev@movial.com> [22/1] 
x-pstn-neptune: 0/0/0.00/0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0

Several static uninitialized variables are used in the scope of
__init functions but are themselves not marked as __initdata.
This patch is to put those variables to where they belong and
to reduce the memory footprint a little bit.

Also, a couple of lines with spaces instead of tabs were fixed.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.com>
---
 arch/mips/ar7/platform.c        |    2 +-
 arch/mips/sgi-ip22/ip22-eisa.c  |    4 ++--
 arch/mips/sgi-ip22/ip22-setup.c |    2 +-
 arch/mips/sgi-ip32/ip32-setup.c |    2 +-
 arch/mips/sni/setup.c           |    2 +-
 arch/mips/txx9/generic/setup.c  |    2 +-
 arch/mips/txx9/rbtx4939/setup.c |    4 ++--
 7 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/arch/mips/ar7/platform.c b/arch/mips/ar7/platform.c
index 835f3f0..85169c0 100644
--- a/arch/mips/ar7/platform.c
+++ b/arch/mips/ar7/platform.c
@@ -505,7 +505,7 @@ static int __init ar7_register_devices(void)
 	int res;
 	u32 *bootcr, val;
 #ifdef CONFIG_SERIAL_8250
-	static struct uart_port uart_port[2];
+	static struct uart_port uart_port[2] __initdata;
=20
 	memset(uart_port, 0, sizeof(struct uart_port) * 2);
=20
diff --git a/arch/mips/sgi-ip22/ip22-eisa.c b/arch/mips/sgi-ip22/ip22-eisa.=
c
index 1617241..da44ccb 100644
--- a/arch/mips/sgi-ip22/ip22-eisa.c
+++ b/arch/mips/sgi-ip22/ip22-eisa.c
@@ -50,9 +50,9 @@
=20
 static char __init *decode_eisa_sig(unsigned long addr)
 {
-        static char sig_str[EISA_SIG_LEN];
+	static char sig_str[EISA_SIG_LEN] __initdata;
 	u8 sig[4];
-        u16 rev;
+	u16 rev;
 	int i;
=20
 	for (i =3D 0; i < 4; i++) {
diff --git a/arch/mips/sgi-ip22/ip22-setup.c b/arch/mips/sgi-ip22/ip22-setu=
p.c
index b9a9313..5deeb68 100644
--- a/arch/mips/sgi-ip22/ip22-setup.c
+++ b/arch/mips/sgi-ip22/ip22-setup.c
@@ -67,7 +67,7 @@ void __init plat_mem_setup(void)
 	cserial =3D ArcGetEnvironmentVariable("ConsoleOut");
=20
 	if ((ctype && *ctype =3D=3D 'd') || (cserial && *cserial =3D=3D 's')) {
-		static char options[8];
+		static char options[8] __initdata;
 		char *baud =3D ArcGetEnvironmentVariable("dbaud");
 		if (baud)
 			strcpy(options, baud);
diff --git a/arch/mips/sgi-ip32/ip32-setup.c b/arch/mips/sgi-ip32/ip32-setu=
p.c
index c5a5d4a..3abd146 100644
--- a/arch/mips/sgi-ip32/ip32-setup.c
+++ b/arch/mips/sgi-ip32/ip32-setup.c
@@ -90,7 +90,7 @@ void __init plat_mem_setup(void)
 	{
 		char* con =3D ArcGetEnvironmentVariable("console");
 		if (con && *con =3D=3D 'd') {
-			static char options[8];
+			static char options[8] __initdata;
 			char *baud =3D ArcGetEnvironmentVariable("dbaud");
 			if (baud)
 				strcpy(options, baud);
diff --git a/arch/mips/sni/setup.c b/arch/mips/sni/setup.c
index a49272c..d16b462 100644
--- a/arch/mips/sni/setup.c
+++ b/arch/mips/sni/setup.c
@@ -60,7 +60,7 @@ static void __init sni_console_setup(void)
 	char *cdev;
 	char *baud;
 	int port;
-	static char options[8];
+	static char options[8] __initdata;
=20
 	cdev =3D prom_getenv("console_dev");
 	if (strncmp(cdev, "tty", 3) =3D=3D 0) {
diff --git a/arch/mips/txx9/generic/setup.c b/arch/mips/txx9/generic/setup.=
c
index 06e801c..2cb8c49 100644
--- a/arch/mips/txx9/generic/setup.c
+++ b/arch/mips/txx9/generic/setup.c
@@ -664,7 +664,7 @@ void __init txx9_physmap_flash_init(int no, unsigned lo=
ng addr,
 	};
 	struct platform_device *pdev;
 #ifdef CONFIG_MTD_PARTITIONS
-	static struct mtd_partition parts[2];
+	static struct mtd_partition parts[2] __initdata;
 	struct physmap_flash_data pdata_part;
=20
 	/* If this area contained boot area, make separate partition */
diff --git a/arch/mips/txx9/rbtx4939/setup.c b/arch/mips/txx9/rbtx4939/setu=
p.c
index b0c241e..64914d4 100644
--- a/arch/mips/txx9/rbtx4939/setup.c
+++ b/arch/mips/txx9/rbtx4939/setup.c
@@ -379,8 +379,8 @@ static void __init rbtx4939_mtd_init(void)
 		struct rbtx4939_flash_data data;
 	} pdevs[4];
 	int i;
-	static char names[4][8];
-	static struct mtd_partition parts[4];
+	static char names[4][8] __initdata;
+	static struct mtd_partition parts[4] __initdata;
 	struct rbtx4939_flash_data *boot_pdata =3D &pdevs[0].data;
 	u8 bdipsw =3D readb(rbtx4939_bdipsw_addr) & 0x0f;
=20
--=20
1.6.3.3


