Skip to content

Commit

Permalink
[IA64] Fix wrong use of memparse in efi.c
Browse files Browse the repository at this point in the history
The check of (end != cp) after memparse in efi.c looks wrong to me.
The result is that we can't use mem= and max_addr= kernel parameter at
the same time.

The following patch removed the check just like other arches do.

Signed-off-by: Zou Nan hai <[email protected]>
Signed-off-by: Tony Luck <[email protected]>
  • Loading branch information
zounanhai authored and aegl committed Feb 7, 2006
1 parent ecdd5da commit 9d78f43
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions arch/ia64/kernel/efi.c
Original file line number Diff line number Diff line change
Expand Up @@ -410,24 +410,16 @@ efi_init (void)
efi_config_table_t *config_tables;
efi_char16_t *c16;
u64 efi_desc_size;
char *cp, *end, vendor[100] = "unknown";
char *cp, vendor[100] = "unknown";
extern char saved_command_line[];
int i;

/* it's too early to be able to use the standard kernel command line support... */
for (cp = saved_command_line; *cp; ) {
if (memcmp(cp, "mem=", 4) == 0) {
cp += 4;
mem_limit = memparse(cp, &end);
if (end != cp)
break;
cp = end;
mem_limit = memparse(cp + 4, &cp);
} else if (memcmp(cp, "max_addr=", 9) == 0) {
cp += 9;
max_addr = GRANULEROUNDDOWN(memparse(cp, &end));
if (end != cp)
break;
cp = end;
max_addr = GRANULEROUNDDOWN(memparse(cp + 9, &cp));
} else {
while (*cp != ' ' && *cp)
++cp;
Expand Down

0 comments on commit 9d78f43

Please sign in to comment.