ramips: fix compiler warning in prom.c
authorGabor Juhos <juhosg@openwrt.org>
Fri, 10 Feb 2012 17:38:46 +0000 (17:38 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Fri, 10 Feb 2012 17:38:46 +0000 (17:38 +0000)
SVN-Revision: 30424

target/linux/ramips/files/arch/mips/ralink/common/prom.c

index b207b66a8bcb5eebcb736e8c1e7f985e6c6dff0d..fdbcb7979671e29872d05aa78d9427c3270c8207 100644 (file)
@@ -43,13 +43,13 @@ static inline void *to_ram_addr(void *addr)
        return NULL;
 }
 
+static char ramips_cmdline_buf[COMMAND_LINE_SIZE] __initdata;
 static void __init prom_append_cmdline(const char *name,
                                       const char *value)
 {
-       char buf[COMMAND_LINE_SIZE];
-
-       snprintf(buf, sizeof(buf), " %s=%s", name, value);
-       strlcat(arcs_cmdline, buf, sizeof(arcs_cmdline));
+       snprintf(ramips_cmdline_buf, sizeof(ramips_cmdline_buf),
+                " %s=%s", name, value);
+       strlcat(arcs_cmdline, ramips_cmdline_buf, sizeof(arcs_cmdline));
 }
 
 #ifdef CONFIG_IMAGE_CMDLINE_HACK