Skip to content

Commit

Permalink
[MIPS] Initialization of Alchemy boards
Browse files Browse the repository at this point in the history
An earlier update changed some calls from simple_strotl to strict_strtol but
did not account for the differences in the syntax between the calls.
simple_strotl returns the integer; strict_strtol returns an error code and
takes a pointer to the result.  As it was, NULL was being passed in place of
the result, which led to failures during kernel initialization when using
YAMON.

Signed-off-by: Kevin Hickey <khickey@rmicorp.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Kevin Hickey authored and Ralf Baechle committed Jul 30, 2008
1 parent af6dc22 commit fd7ccfa
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion arch/mips/au1000/db1x00/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@ void __init prom_init(void)
if (!memsize_str)
memsize = 0x04000000;
else
memsize = strict_strtol(memsize_str, 0, NULL);
strict_strtol(memsize_str, 0, &memsize);
add_memory_region(0, memsize, BOOT_MEM_RAM);
}
2 changes: 1 addition & 1 deletion arch/mips/au1000/mtx-1/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@ void __init prom_init(void)
if (!memsize_str)
memsize = 0x04000000;
else
memsize = strict_strtol(memsize_str, 0, NULL);
strict_strtol(memsize_str, 0, &memsize);
add_memory_region(0, memsize, BOOT_MEM_RAM);
}
2 changes: 1 addition & 1 deletion arch/mips/au1000/pb1000/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ void __init prom_init(void)
if (!memsize_str)
memsize = 0x04000000;
else
memsize = strict_strtol(memsize_str, 0, NULL);
strict_strtol(memsize_str, 0, &memsize);
add_memory_region(0, memsize, BOOT_MEM_RAM);
}
2 changes: 1 addition & 1 deletion arch/mips/au1000/pb1100/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ void __init prom_init(void)
if (!memsize_str)
memsize = 0x04000000;
else
memsize = strict_strtol(memsize_str, 0, NULL);
strict_strtol(memsize_str, 0, &memsize);

add_memory_region(0, memsize, BOOT_MEM_RAM);
}
2 changes: 1 addition & 1 deletion arch/mips/au1000/pb1200/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@ void __init prom_init(void)
if (!memsize_str)
memsize = 0x08000000;
else
memsize = strict_strtol(memsize_str, 0, NULL);
strict_strtol(memsize_str, 0, &memsize);
add_memory_region(0, memsize, BOOT_MEM_RAM);
}
2 changes: 1 addition & 1 deletion arch/mips/au1000/pb1500/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@ void __init prom_init(void)
if (!memsize_str)
memsize = 0x04000000;
else
memsize = strict_strtol(memsize_str, 0, NULL);
strict_strtol(memsize_str, 0, &memsize);
add_memory_region(0, memsize, BOOT_MEM_RAM);
}
2 changes: 1 addition & 1 deletion arch/mips/au1000/pb1550/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@ void __init prom_init(void)
if (!memsize_str)
memsize = 0x08000000;
else
memsize = strict_strtol(memsize_str, 0, NULL);
strict_strtol(memsize_str, 0, &memsize);
add_memory_region(0, memsize, BOOT_MEM_RAM);
}
2 changes: 1 addition & 1 deletion arch/mips/au1000/xxs1500/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@ void __init prom_init(void)
if (!memsize_str)
memsize = 0x04000000;
else
memsize = strict_strtol(memsize_str, 0, NULL);
strict_strtol(memsize_str, 0, &memsize);
add_memory_region(0, memsize, BOOT_MEM_RAM);
}

0 comments on commit fd7ccfa

Please sign in to comment.