diff options
author | Thomas Langer <thomas.langer@lantiq.com> | 2012-05-02 06:27:39 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2012-05-15 11:49:22 -0400 |
commit | 730fa039f16df58c2dc3ff2894b7d767f100cf6e (patch) | |
tree | aac6f2460a5bfae54473abc896643ab0a9d4277b /arch/mips/lantiq | |
parent | 7705f6867bfc6f2ea42c3965a85df72abf070c86 (diff) |
MIPS: lantiq: fix cmdline parsing
The code tested if the KSEG1 mapped address of argv was != 0. We need to use
CPHYSADDR instead to make the conditional actually work.
Signed-off-by: Thomas Langer <thomas.langer@lantiq.com>
Signed-off-by: John Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/3722/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/lantiq')
-rw-r--r-- | arch/mips/lantiq/prom.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/mips/lantiq/prom.c b/arch/mips/lantiq/prom.c index 664b7b722248..cd568921f191 100644 --- a/arch/mips/lantiq/prom.c +++ b/arch/mips/lantiq/prom.c | |||
@@ -45,10 +45,12 @@ static void __init prom_init_cmdline(void) | |||
45 | char **argv = (char **) KSEG1ADDR(fw_arg1); | 45 | char **argv = (char **) KSEG1ADDR(fw_arg1); |
46 | int i; | 46 | int i; |
47 | 47 | ||
48 | arcs_cmdline[0] = '\0'; | ||
49 | |||
48 | for (i = 0; i < argc; i++) { | 50 | for (i = 0; i < argc; i++) { |
49 | char *p = (char *) KSEG1ADDR(argv[i]); | 51 | char *p = (char *) KSEG1ADDR(argv[i]); |
50 | 52 | ||
51 | if (p && *p) { | 53 | if (CPHYSADDR(p) && *p) { |
52 | strlcat(arcs_cmdline, p, sizeof(arcs_cmdline)); | 54 | strlcat(arcs_cmdline, p, sizeof(arcs_cmdline)); |
53 | strlcat(arcs_cmdline, " ", sizeof(arcs_cmdline)); | 55 | strlcat(arcs_cmdline, " ", sizeof(arcs_cmdline)); |
54 | } | 56 | } |