Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7580c9c3 authored by Dmitri Vorobiev's avatar Dmitri Vorobiev Committed by Ralf Baechle
Browse files

MIPS: Replace all usages of CL_SIZE by COMMAND_LINE_SIZE



The MIPS-specific macro CL_SIZE is merely aliasing the macro
COMMAND_LINE_SIZE. Other architectures use the latter; also,
COMMAND_LINE_SIZE is documented in kernel-parameters.txt, so
let's use it, and remove the alias.

Signed-off-by: default avatarDmitri Vorobiev <dmitri.vorobiev@movial.com>
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent cb6edd45
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -100,11 +100,11 @@ static __init void prom_init_console(void)

static __init void prom_init_cmdline(void)
{
	static char buf[CL_SIZE] __initdata;
	static char buf[COMMAND_LINE_SIZE] __initdata;

	/* Get the kernel command line from CFE */
	if (cfe_getenv("LINUX_CMDLINE", buf, CL_SIZE) >= 0) {
		buf[CL_SIZE-1] = 0;
	if (cfe_getenv("LINUX_CMDLINE", buf, COMMAND_LINE_SIZE) >= 0) {
		buf[COMMAND_LINE_SIZE - 1] = 0;
		strcpy(arcs_cmdline, buf);
	}

@@ -112,13 +112,13 @@ static __init void prom_init_cmdline(void)
	 * as CFE is not available anymore later in the boot process. */
	if ((strstr(arcs_cmdline, "console=")) == NULL) {
		/* Try to read the default serial port used by CFE */
		if ((cfe_getenv("BOOT_CONSOLE", buf, CL_SIZE) < 0)
		if ((cfe_getenv("BOOT_CONSOLE", buf, COMMAND_LINE_SIZE) < 0)
		    || (strncmp("uart", buf, 4)))
			/* Default to uart0 */
			strcpy(buf, "uart0");

		/* Compute the new command line */
		snprintf(arcs_cmdline, CL_SIZE, "%s console=ttyS%c,115200",
		snprintf(arcs_cmdline, COMMAND_LINE_SIZE, "%s console=ttyS%c,115200",
			 arcs_cmdline, buf[4]);
	}
}
+1 −3
Original line number Diff line number Diff line
@@ -69,8 +69,6 @@
#define MACH_DEXXON_GDIUM2F10  5
#define MACH_LOONGSON_END      6

#define CL_SIZE			COMMAND_LINE_SIZE

extern char *system_type;
const char *get_system_type(void);

@@ -107,7 +105,7 @@ extern void free_init_pages(const char *what,
/*
 * Initial kernel command line, usually setup by prom_init()
 */
extern char arcs_cmdline[CL_SIZE];
extern char arcs_cmdline[COMMAND_LINE_SIZE];

/*
 * Registers a0, a1, a3 and a4 as passed to the kernel entry by firmware
+2 −2
Original line number Diff line number Diff line
@@ -58,8 +58,8 @@ EXPORT_SYMBOL(mips_machtype);

struct boot_mem_map boot_mem_map;

static char command_line[CL_SIZE];
       char arcs_cmdline[CL_SIZE]=CONFIG_CMDLINE;
static char command_line[COMMAND_LINE_SIZE];
       char arcs_cmdline[COMMAND_LINE_SIZE] = CONFIG_CMDLINE;

/*
 * mips_io_port_base is the begin of the address space to which x86 style
+2 −2
Original line number Diff line number Diff line
@@ -100,8 +100,8 @@ void __init prom_init(void)

	/* Get the command line */
	if (argc > 0) {
		strncpy(arcs_cmdline, argv[0], CL_SIZE-1);
		arcs_cmdline[CL_SIZE-1] = '\0';
		strncpy(arcs_cmdline, argv[0], COMMAND_LINE_SIZE-1);
		arcs_cmdline[COMMAND_LINE_SIZE-1] = '\0';
	}

	/* Set the I/O base address */
+1 −1
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@ static struct prom_pmemblock * __init prom_getmdesc(void)
	char *memsize_str;
	unsigned int memsize;
	char *ptr;
	static char cmdline[CL_SIZE] __initdata;
	static char cmdline[COMMAND_LINE_SIZE] __initdata;

	/* otherwise look in the environment */
	memsize_str = prom_getenv("memsize");
Loading