patch-2.4.22 linux-2.4.22/arch/mips/arc/cmdline.c

Next file: linux-2.4.22/arch/mips/arc/console.c
Previous file: linux-2.4.22/arch/mips/arc/arc_con.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.21/arch/mips/arc/cmdline.c linux-2.4.22/arch/mips/arc/cmdline.c
@@ -20,7 +20,7 @@
 
 char * __init prom_getcmdline(void)
 {
-	return &(arcs_cmdline[0]);
+	return arcs_cmdline;
 }
 
 static char *ignored[] = {
@@ -32,7 +32,6 @@
 	"OSLoadFilename=",
 	"OSLoadOptions="
 };
-#define NENTS(foo) ((sizeof((foo)) / (sizeof((foo[0])))))
 
 static char *used_arc[][2] = {
 	{ "OSLoadPartition=", "root=" },
@@ -47,7 +46,7 @@
 	actr = 1; /* Always ignore argv[0] */
 
 	while (actr < prom_argc) {
-		for(i = 0; i < NENTS(used_arc); i++) {
+		for(i = 0; i < ARRAY_SIZE(used_arc); i++) {
 			int len = strlen(used_arc[i][0]);
 
 			if (!strncmp(prom_argv(actr), used_arc[i][0], len)) {
@@ -71,7 +70,6 @@
 	return cp;
 }
 
-
 void __init prom_init_cmdline(void)
 {
 	char *cp;
@@ -79,7 +77,7 @@
 
 	actr = 1; /* Always ignore argv[0] */
 
-	cp = &(arcs_cmdline[0]);
+	cp = arcs_cmdline;
 	/*
 	 * Move ARC variables to the beginning to make sure they can be
 	 * overridden by later arguments.
@@ -87,7 +85,7 @@
 	cp = move_firmware_args(cp);
 
 	while (actr < prom_argc) {
-		for (i = 0; i < NENTS(ignored); i++) {
+		for (i = 0; i < ARRAY_SIZE(ignored); i++) {
 			int len = strlen(ignored[i]);
 
 			if (!strncmp(prom_argv(actr), ignored[i], len))
@@ -101,11 +99,12 @@
 	pic_cont:
 		actr++;
 	}
-	if (cp != &(arcs_cmdline[0])) /* get rid of trailing space */
+
+	if (cp != arcs_cmdline)		/* get rid of trailing space */
 		--cp;
 	*cp = '\0';
 
 #ifdef DEBUG_CMDLINE
-	prom_printf("prom_init_cmdline: %s\n", &(arcs_cmdline[0]));
+	printk(KERN_DEBUG "prom cmdline: %s\n", arcs_cmdline);
 #endif
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)