Commit 66f1991bc2357436498ac990302b6f5bf403d7ef
Committed by
Linus Torvalds
1 parent
1fa7e5473c
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>
Showing 1 changed file with 1 additions and 2 deletions Side-by-side Diff
lib/bitmap.c
... | ... | @@ -359,7 +359,6 @@ |
359 | 359 | |
360 | 360 | #define CHUNKSZ 32 |
361 | 361 | #define nbits_to_hold_value(val) fls(val) |
362 | -#define unhex(c) (isdigit(c) ? (c - '0') : (toupper(c) - 'A' + 10)) | |
363 | 362 | #define BASEDEC 10 /* fancier cpuset lists input in decimal */ |
364 | 363 | |
365 | 364 | /** |
... | ... | @@ -466,7 +465,7 @@ |
466 | 465 | if (chunk & ~((1UL << (CHUNKSZ - 4)) - 1)) |
467 | 466 | return -EOVERFLOW; |
468 | 467 | |
469 | - chunk = (chunk << 4) | unhex(c); | |
468 | + chunk = (chunk << 4) | hex_to_bin(c); | |
470 | 469 | ndigits++; totaldigits++; |
471 | 470 | } |
472 | 471 | if (ndigits == 0) |