summaryrefslogtreecommitdiffstats
path: root/lib/bitmap.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andy.shevchenko@gmail.com>2010-10-26 14:23:03 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-26 16:52:18 -0700
commit66f1991bc2357436498ac990302b6f5bf403d7ef (patch)
tree1b98628c3863b23f81f9475d7c29f096206512c6 /lib/bitmap.c
parent1fa7e5473cba543b02a396ced9e407f614bb117c (diff)
downloadop-kernel-dev-66f1991bc2357436498ac990302b6f5bf403d7ef.zip
op-kernel-dev-66f1991bc2357436498ac990302b6f5bf403d7ef.tar.gz
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/bitmap.c')
-rw-r--r--lib/bitmap.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/bitmap.c b/lib/bitmap.c
index ffb78c9..741fae9 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)
OpenPOWER on IntegriCloud