[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1283872685-23046-1-git-send-email-andy.shevchenko@gmail.com>
Date: Tue, 7 Sep 2010 18:18:05 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: linux-kernel@...r.kernel.org
Cc: Andy Shevchenko <andy.shevchenko@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: [PATCH] lib: use hex_to_bin()
Signed-off-by: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>
---
lib/bitmap.c | 3 +--
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)
--
1.7.2.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists