MIPS: arc: use function argument for passing argc/argv to prom_init_cmdline
prom_argc and prom_argv are only used by prom_init_cmdline(), so we could pass them directly as function argument. Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de> Signed-off-by: Paul Burton <paulburton@kernel.org> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Paul Burton <paul.burton@mips.com> Cc: James Hogan <jhogan@kernel.org> Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org
This commit is contained in:

committed by
Paul Burton

parent
cbd09241dd
commit
7b16831d1e
@@ -17,6 +17,12 @@
|
||||
|
||||
#undef DEBUG_CMDLINE
|
||||
|
||||
/*
|
||||
* A 32-bit ARC PROM pass arguments and environment as 32-bit pointer.
|
||||
* These macro take care of sign extension.
|
||||
*/
|
||||
#define prom_argv(index) ((char *) (long)argv[(index)])
|
||||
|
||||
static char *ignored[] = {
|
||||
"ConsoleIn=",
|
||||
"ConsoleOut=",
|
||||
@@ -32,14 +38,14 @@ static char *used_arc[][2] = {
|
||||
{ "OSLoadOptions=", "" }
|
||||
};
|
||||
|
||||
static char * __init move_firmware_args(char* cp)
|
||||
static char __init *move_firmware_args(int argc, LONG *argv, char *cp)
|
||||
{
|
||||
char *s;
|
||||
int actr, i;
|
||||
|
||||
actr = 1; /* Always ignore argv[0] */
|
||||
|
||||
while (actr < prom_argc) {
|
||||
while (actr < argc) {
|
||||
for(i = 0; i < ARRAY_SIZE(used_arc); i++) {
|
||||
int len = strlen(used_arc[i][0]);
|
||||
|
||||
@@ -64,7 +70,7 @@ static char * __init move_firmware_args(char* cp)
|
||||
return cp;
|
||||
}
|
||||
|
||||
void __init prom_init_cmdline(void)
|
||||
void __init prom_init_cmdline(int argc, LONG *argv)
|
||||
{
|
||||
char *cp;
|
||||
int actr, i;
|
||||
@@ -76,9 +82,9 @@ void __init prom_init_cmdline(void)
|
||||
* Move ARC variables to the beginning to make sure they can be
|
||||
* overridden by later arguments.
|
||||
*/
|
||||
cp = move_firmware_args(cp);
|
||||
cp = move_firmware_args(argc, argv, cp);
|
||||
|
||||
while (actr < prom_argc) {
|
||||
while (actr < argc) {
|
||||
for (i = 0; i < ARRAY_SIZE(ignored); i++) {
|
||||
int len = strlen(ignored[i]);
|
||||
|
||||
|
Reference in New Issue
Block a user