Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/galak/powerpc
This commit is contained in:
commit
facee873de
@ -1030,26 +1030,14 @@ static int __init early_init_dt_scan_chosen(unsigned long node,
|
|||||||
|
|
||||||
if (strstr(cmd_line, "mem=")) {
|
if (strstr(cmd_line, "mem=")) {
|
||||||
char *p, *q;
|
char *p, *q;
|
||||||
unsigned long maxmem = 0;
|
|
||||||
|
|
||||||
for (q = cmd_line; (p = strstr(q, "mem=")) != 0; ) {
|
for (q = cmd_line; (p = strstr(q, "mem=")) != 0; ) {
|
||||||
q = p + 4;
|
q = p + 4;
|
||||||
if (p > cmd_line && p[-1] != ' ')
|
if (p > cmd_line && p[-1] != ' ')
|
||||||
continue;
|
continue;
|
||||||
maxmem = simple_strtoul(q, &q, 0);
|
memory_limit = memparse(q, &q);
|
||||||
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 = maxmem;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* break now */
|
/* break now */
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -11,7 +11,7 @@ int strcasecmp(const char *s1, const char *s2)
|
|||||||
return c1 - c2;
|
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;
|
int c1, c2;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user