From cbd312b94ed123dc7080c9591cb715cd2a7327c0 Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Mon, 27 Mar 2006 18:26:18 -0600 Subject: ppc: fix strncasecmp prototype Match, Linus's fix to arch/powerpc in arch/ppc. strcasecmp takes a size_t, not an int, as its third argument. Signed-off-by: Kumar Gala --- arch/ppc/lib/strcase.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/ppc/lib/strcase.c b/arch/ppc/lib/strcase.c index 36b521091bbc..d98857890619 100644 --- a/arch/ppc/lib/strcase.c +++ b/arch/ppc/lib/strcase.c @@ -11,7 +11,7 @@ int strcasecmp(const char *s1, const char *s2) return c1 - c2; } -int strncasecmp(const char *s1, const char *s2, int n) +int strncasecmp(const char *s1, const char *s2, size_t n) { int c1, c2; -- cgit v1.2.3 From 10d713aef238b02a774766b2622027361630e28d Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Mon, 27 Mar 2006 18:26:42 -0600 Subject: powerpc: use memparse() for mem= command line parsing Use memparse() instead of our own code for handling the parsing of mem= Signed-off-by: Kumar Gala --- arch/powerpc/kernel/prom.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 5a24415a2e3c..95d15eb5c03f 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c @@ -1030,25 +1030,13 @@ static int __init early_init_dt_scan_chosen(unsigned long node, if (strstr(cmd_line, "mem=")) { char *p, *q; - unsigned long maxmem = 0; for (q = cmd_line; (p = strstr(q, "mem=")) != 0; ) { q = p + 4; if (p > cmd_line && p[-1] != ' ') continue; - maxmem = simple_strtoul(q, &q, 0); - if (*q == 'k' || *q == 'K') { - maxmem <<= 10; - ++q; - } else if (*q == 'm' || *q == 'M') { - maxmem <<= 20; - ++q; - } else if (*q == 'g' || *q == 'G') { - maxmem <<= 30; - ++q; - } + memory_limit = memparse(q, &q); } - memory_limit = maxmem; } /* break now */ -- cgit v1.2.3