| To: | Ralf Baechle <ralf@linux-mips.org> |
|---|---|
| Subject: | [PATCH 12/14] MIPS: lantiq: fix cmdline parsing |
| From: | John Crispin <blogic@openwrt.org> |
| Date: | Mon, 30 Apr 2012 13:33:07 +0200 |
| Cc: | "linux-mips@linux-mips.org" <linux-mips@linux-mips.org>, John Crispin <blogic@openwrt.org>, Thomas Langer <thomas.langer@lantiq.com> |
| In-reply-to: | <1335785589-32532-1-git-send-email-blogic@openwrt.org> |
| References: | <1335785589-32532-1-git-send-email-blogic@openwrt.org> |
| Sender: | linux-mips-bounce@linux-mips.org |
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>
---
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 664b7b7..cd56892 100644
--- a/arch/mips/lantiq/prom.c
+++ b/arch/mips/lantiq/prom.c
@@ -45,10 +45,12 @@ static void __init prom_init_cmdline(void)
char **argv = (char **) KSEG1ADDR(fw_arg1);
int i;
+ arcs_cmdline[0] = '\0';
+
for (i = 0; i < argc; i++) {
- char *p = (char *) KSEG1ADDR(argv[i]);
+ char *p = (char *) KSEG1ADDR(argv[i]);
- if (p && *p) {
+ if (CPHYSADDR(p) && *p) {
strlcat(arcs_cmdline, p, sizeof(arcs_cmdline));
strlcat(arcs_cmdline, " ", sizeof(arcs_cmdline));
}
--
1.7.9.1
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH 13/14] MIPS: lantiq: add xway soc ids, John Crispin |
|---|---|
| Next by Date: | Re: [PATCH 04/14] MIPS: Add helper function to allow platforms to point at a DTB., David Daney |
| Previous by Thread: | [PATCH 13/14] MIPS: lantiq: add xway soc ids, John Crispin |
| Next by Thread: | [PATCH 4/4] MTD: MIPS: lantiq: add xway nand support, John Crispin |
| Indexes: | [Date] [Thread] [Top] [All Lists] |