diff options
author | Andy Shevchenko <andy.shevchenko@gmail.com> | 2010-10-26 14:23:03 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-26 16:52:18 -0700 |
commit | 66f1991bc2357436498ac990302b6f5bf403d7ef (patch) | |
tree | 1b98628c3863b23f81f9475d7c29f096206512c6 /lib | |
parent | 1fa7e5473cba543b02a396ced9e407f614bb117c (diff) | |
download | linux-exynos-66f1991bc2357436498ac990302b6f5bf403d7ef.tar.gz linux-exynos-66f1991bc2357436498ac990302b6f5bf403d7ef.tar.bz2 linux-exynos-66f1991bc2357436498ac990302b6f5bf403d7ef.zip |
lib/bitmap.c: use hex_to_bin()
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bitmap.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/bitmap.c b/lib/bitmap.c index ffb78c916ccd..741fae905ae3 100644 --- a/lib/bitmap.c +++ b/lib/bitmap.c @@ -359,7 +359,6 @@ EXPORT_SYMBOL(bitmap_find_next_zero_area); #define CHUNKSZ 32 #define nbits_to_hold_value(val) fls(val) -#define unhex(c) (isdigit(c) ? (c - '0') : (toupper(c) - 'A' + 10)) #define BASEDEC 10 /* fancier cpuset lists input in decimal */ /** @@ -466,7 +465,7 @@ int __bitmap_parse(const char *buf, unsigned int buflen, if (chunk & ~((1UL << (CHUNKSZ - 4)) - 1)) return -EOVERFLOW; - chunk = (chunk << 4) | unhex(c); + chunk = (chunk << 4) | hex_to_bin(c); ndigits++; totaldigits++; } if (ndigits == 0) |