diff options
author | Milton Miller <miltonm@bga.com> | 2008-10-20 14:03:18 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2008-10-21 00:20:08 -0400 |
commit | 34d81f858a3bdec568bf08c4feb997ccd3d40b94 (patch) | |
tree | 7ecadd4c6387d88370c974db4ede2715a3ebcbf8 /arch/powerpc/kernel | |
parent | 0dcd440120ef12879ff34fc78d7e4abf171c79e4 (diff) |
powerpc: Delete unused prom_strtoul and prom_memparse
These functions should have been static, and inspection shows they
are no longer used. (We used to parse mem= but we now defer that
to early_param).
Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r-- | arch/powerpc/kernel/prom_init.c | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index 2fdbc18ae94a..23e0db203329 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c | |||
@@ -487,67 +487,6 @@ static int __init prom_setprop(phandle node, const char *nodename, | |||
487 | return call_prom("interpret", 1, 1, (u32)(unsigned long) cmd); | 487 | return call_prom("interpret", 1, 1, (u32)(unsigned long) cmd); |
488 | } | 488 | } |
489 | 489 | ||
490 | /* We can't use the standard versions because of RELOC headaches. */ | ||
491 | #define isxdigit(c) (('0' <= (c) && (c) <= '9') \ | ||
492 | || ('a' <= (c) && (c) <= 'f') \ | ||
493 | || ('A' <= (c) && (c) <= 'F')) | ||
494 | |||
495 | #define isdigit(c) ('0' <= (c) && (c) <= '9') | ||
496 | #define islower(c) ('a' <= (c) && (c) <= 'z') | ||
497 | #define toupper(c) (islower(c) ? ((c) - 'a' + 'A') : (c)) | ||
498 | |||
499 | unsigned long prom_strtoul(const char *cp, const char **endp) | ||
500 | { | ||
501 | unsigned long result = 0, base = 10, value; | ||
502 | |||
503 | if (*cp == '0') { | ||
504 | base = 8; | ||
505 | cp++; | ||
506 | if (toupper(*cp) == 'X') { | ||
507 | cp++; | ||
508 | base = 16; | ||
509 | } | ||
510 | } | ||
511 | |||
512 | while (isxdigit(*cp) && | ||
513 | (value = isdigit(*cp) ? *cp - '0' : toupper(*cp) - 'A' + 10) < base) { | ||
514 | result = result * base + value; | ||
515 | cp++; | ||
516 | } | ||
517 | |||
518 | if (endp) | ||
519 | *endp = cp; | ||
520 | |||
521 | return result; | ||
522 | } | ||
523 | |||
524 | unsigned long prom_memparse(const char *ptr, const char **retptr) | ||
525 | { | ||
526 | unsigned long ret = prom_strtoul(ptr, retptr); | ||
527 | int shift = 0; | ||
528 | |||
529 | /* | ||
530 | * We can't use a switch here because GCC *may* generate a | ||
531 | * jump table which won't work, because we're not running at | ||
532 | * the address we're linked at. | ||
533 | */ | ||
534 | if ('G' == **retptr || 'g' == **retptr) | ||
535 | shift = 30; | ||
536 | |||
537 | if ('M' == **retptr || 'm' == **retptr) | ||
538 | shift = 20; | ||
539 | |||
540 | if ('K' == **retptr || 'k' == **retptr) | ||
541 | shift = 10; | ||
542 | |||
543 | if (shift) { | ||
544 | ret <<= shift; | ||
545 | (*retptr)++; | ||
546 | } | ||
547 | |||
548 | return ret; | ||
549 | } | ||
550 | |||
551 | /* | 490 | /* |
552 | * Early parsing of the command line passed to the kernel, used for | 491 | * Early parsing of the command line passed to the kernel, used for |
553 | * "mem=x" and the options that affect the iommu | 492 | * "mem=x" and the options that affect the iommu |