diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Kconfig.debug | 9 | ||||
-rw-r--r-- | lib/bitmap.c | 11 | ||||
-rw-r--r-- | lib/vsprintf.c | 2 |
3 files changed, 21 insertions, 1 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index e1d4764435ed..800ac8485544 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
@@ -735,6 +735,15 @@ config FIREWIRE_OHCI_REMOTE_DMA | |||
735 | 735 | ||
736 | If unsure, say N. | 736 | If unsure, say N. |
737 | 737 | ||
738 | menuconfig BUILD_DOCSRC | ||
739 | bool "Build targets in Documentation/ tree" | ||
740 | depends on HEADERS_CHECK | ||
741 | help | ||
742 | This option attempts to build objects from the source files in the | ||
743 | kernel Documentation/ tree. | ||
744 | |||
745 | Say N if you are unsure. | ||
746 | |||
738 | source "samples/Kconfig" | 747 | source "samples/Kconfig" |
739 | 748 | ||
740 | source "lib/Kconfig.kgdb" | 749 | source "lib/Kconfig.kgdb" |
diff --git a/lib/bitmap.c b/lib/bitmap.c index 482df94ea21e..06fb57c86de0 100644 --- a/lib/bitmap.c +++ b/lib/bitmap.c | |||
@@ -316,6 +316,17 @@ int bitmap_scnprintf(char *buf, unsigned int buflen, | |||
316 | EXPORT_SYMBOL(bitmap_scnprintf); | 316 | EXPORT_SYMBOL(bitmap_scnprintf); |
317 | 317 | ||
318 | /** | 318 | /** |
319 | * bitmap_scnprintf_len - return buffer length needed to convert | ||
320 | * bitmap to an ASCII hex string | ||
321 | * @nr_bits: number of bits to be converted | ||
322 | */ | ||
323 | int bitmap_scnprintf_len(unsigned int nr_bits) | ||
324 | { | ||
325 | unsigned int nr_nibbles = ALIGN(nr_bits, 4) / 4; | ||
326 | return nr_nibbles + ALIGN(nr_nibbles, CHUNKSZ / 4) / (CHUNKSZ / 4) - 1; | ||
327 | } | ||
328 | |||
329 | /** | ||
319 | * __bitmap_parse - convert an ASCII hex string into a bitmap. | 330 | * __bitmap_parse - convert an ASCII hex string into a bitmap. |
320 | * @buf: pointer to buffer containing string. | 331 | * @buf: pointer to buffer containing string. |
321 | * @buflen: buffer size in bytes. If string is smaller than this | 332 | * @buflen: buffer size in bytes. If string is smaller than this |
diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 1dc2d1d18fa8..d8d1d1142248 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c | |||
@@ -220,7 +220,7 @@ int strict_strtou##type(const char *cp, unsigned int base, valtype *res)\ | |||
220 | if (len == 0) \ | 220 | if (len == 0) \ |
221 | return -EINVAL; \ | 221 | return -EINVAL; \ |
222 | \ | 222 | \ |
223 | val = simple_strtoul(cp, &tail, base); \ | 223 | val = simple_strtou##type(cp, &tail, base); \ |
224 | if ((*tail == '\0') || \ | 224 | if ((*tail == '\0') || \ |
225 | ((len == (size_t)(tail - cp) + 1) && (*tail == '\n'))) {\ | 225 | ((len == (size_t)(tail - cp) + 1) && (*tail == '\n'))) {\ |
226 | *res = val; \ | 226 | *res = val; \ |