X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=lib%2Fbitmap.c;h=741fae905ae3ba8d81c0a4cbe9564cdd4e0d4ce7;hb=18cb657ca1bafe635f368346a1676fb04c512edf;hp=d7137e7e06e8b082c29fd1a186d07afbb8f32b16;hpb=9a90e09854a3c7cc603ab8fc9163f77bb1f66cfa;p=karo-tx-linux.git diff --git a/lib/bitmap.c b/lib/bitmap.c index d7137e7e06e8..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) @@ -672,7 +671,7 @@ static int bitmap_pos_to_ord(const unsigned long *buf, int pos, int bits) * * The bit positions 0 through @bits are valid positions in @buf. */ -int bitmap_ord_to_pos(const unsigned long *buf, int ord, int bits) +static int bitmap_ord_to_pos(const unsigned long *buf, int ord, int bits) { int pos = 0;