Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: Move several variables from .bss to .init.data

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>

authored by

Dmitri Vorobiev and committed by
Ralf Baechle
599a8945 7326c4e5

+6 -6
+1 -1
arch/mips/ar7/platform.c
··· 505 505 int res; 506 506 u32 *bootcr, val; 507 507 #ifdef CONFIG_SERIAL_8250 508 - static struct uart_port uart_port[2]; 508 + static struct uart_port uart_port[2] __initdata; 509 509 510 510 memset(uart_port, 0, sizeof(struct uart_port) * 2); 511 511
+2 -2
arch/mips/sgi-ip22/ip22-eisa.c
··· 50 50 51 51 static char __init *decode_eisa_sig(unsigned long addr) 52 52 { 53 - static char sig_str[EISA_SIG_LEN]; 53 + static char sig_str[EISA_SIG_LEN] __initdata; 54 54 u8 sig[4]; 55 - u16 rev; 55 + u16 rev; 56 56 int i; 57 57 58 58 for (i = 0; i < 4; i++) {
+1 -1
arch/mips/sgi-ip22/ip22-setup.c
··· 67 67 cserial = ArcGetEnvironmentVariable("ConsoleOut"); 68 68 69 69 if ((ctype && *ctype == 'd') || (cserial && *cserial == 's')) { 70 - static char options[8]; 70 + static char options[8] __initdata; 71 71 char *baud = ArcGetEnvironmentVariable("dbaud"); 72 72 if (baud) 73 73 strcpy(options, baud);
+1 -1
arch/mips/sgi-ip32/ip32-setup.c
··· 90 90 { 91 91 char* con = ArcGetEnvironmentVariable("console"); 92 92 if (con && *con == 'd') { 93 - static char options[8]; 93 + static char options[8] __initdata; 94 94 char *baud = ArcGetEnvironmentVariable("dbaud"); 95 95 if (baud) 96 96 strcpy(options, baud);
+1 -1
arch/mips/sni/setup.c
··· 60 60 char *cdev; 61 61 char *baud; 62 62 int port; 63 - static char options[8]; 63 + static char options[8] __initdata; 64 64 65 65 cdev = prom_getenv("console_dev"); 66 66 if (strncmp(cdev, "tty", 3) == 0) {