MIPS: Move several variables from .bss to .init.data
authorDmitri Vorobiev <dmitri.vorobiev@movial.com>
Mon, 23 Nov 2009 11:53:37 +0000 (13:53 +0200)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 17 Dec 2009 01:57:27 +0000 (01:57 +0000)
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>
Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/698/
Acked-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/ar7/platform.c
arch/mips/sgi-ip22/ip22-eisa.c
arch/mips/sgi-ip22/ip22-setup.c
arch/mips/sgi-ip32/ip32-setup.c
arch/mips/sni/setup.c

index 835f3f0..85169c0 100644 (file)
@@ -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;
 
        memset(uart_port, 0, sizeof(struct uart_port) * 2);
 
index 1617241..da44ccb 100644 (file)
@@ -50,9 +50,9 @@
 
 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;
 
        for (i = 0; i < 4; i++) {
index b9a9313..5deeb68 100644 (file)
@@ -67,7 +67,7 @@ void __init plat_mem_setup(void)
        cserial = ArcGetEnvironmentVariable("ConsoleOut");
 
        if ((ctype && *ctype == 'd') || (cserial && *cserial == 's')) {
-               static char options[8];
+               static char options[8] __initdata;
                char *baud = ArcGetEnvironmentVariable("dbaud");
                if (baud)
                        strcpy(options, baud);
index c5a5d4a..3abd146 100644 (file)
@@ -90,7 +90,7 @@ void __init plat_mem_setup(void)
        {
                char* con = ArcGetEnvironmentVariable("console");
                if (con && *con == 'd') {
-                       static char options[8];
+                       static char options[8] __initdata;
                        char *baud = ArcGetEnvironmentVariable("dbaud");
                        if (baud)
                                strcpy(options, baud);
index a49272c..d16b462 100644 (file)
@@ -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;
 
        cdev = prom_getenv("console_dev");
        if (strncmp(cdev, "tty", 3) == 0) {