提交 599a8945 编写于 作者: D Dmitri Vorobiev 提交者: Ralf Baechle

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: NDmitri Vorobiev <dmitri.vorobiev@movial.com>
Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/698/Acked-by: NFlorian Fainelli <florian@openwrt.org>
Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
上级 7326c4e5
......@@ -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);
......
......@@ -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++) {
......
......@@ -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);
......
......@@ -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);
......
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册