aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-08-13 13:56:44 +0200
committerIngo Molnar <mingo@elte.hu>2008-08-13 13:56:44 +0200
commit73909f7a665991013dcff42a815fda76d3a7300a (patch)
tree84bb9899e2204bf6af6fd4f249bb909c2a89faf8 /lib
parentd6672c501852d577097f6757c311d937aca0b04b (diff)
parent30a2f3c60a84092c8084dfe788b710f8d0768cd4 (diff)
Merge commit 'v2.6.27-rc3' into core/urgent
Diffstat (limited to 'lib')
-rw-r--r--lib/Kconfig.debug9
-rw-r--r--lib/bitmap.c11
-rw-r--r--lib/vsprintf.c2
3 files changed, 21 insertions, 1 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index e1d4764435e..800ac848554 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -735,6 +735,15 @@ config FIREWIRE_OHCI_REMOTE_DMA
If unsure, say N.
+menuconfig BUILD_DOCSRC
+ bool "Build targets in Documentation/ tree"
+ depends on HEADERS_CHECK
+ help
+ This option attempts to build objects from the source files in the
+ kernel Documentation/ tree.
+
+ Say N if you are unsure.
+
source "samples/Kconfig"
source "lib/Kconfig.kgdb"
diff --git a/lib/bitmap.c b/lib/bitmap.c
index 482df94ea21..06fb57c86de 100644
--- a/lib/bitmap.c
+++ b/lib/bitmap.c
@@ -316,6 +316,17 @@ int bitmap_scnprintf(char *buf, unsigned int buflen,
EXPORT_SYMBOL(bitmap_scnprintf);
/**
+ * bitmap_scnprintf_len - return buffer length needed to convert
+ * bitmap to an ASCII hex string
+ * @nr_bits: number of bits to be converted
+ */
+int bitmap_scnprintf_len(unsigned int nr_bits)
+{
+ unsigned int nr_nibbles = ALIGN(nr_bits, 4) / 4;
+ return nr_nibbles + ALIGN(nr_nibbles, CHUNKSZ / 4) / (CHUNKSZ / 4) - 1;
+}
+
+/**
* __bitmap_parse - convert an ASCII hex string into a bitmap.
* @buf: pointer to buffer containing string.
* @buflen: buffer size in bytes. If string is smaller than this
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index 1dc2d1d18fa..d8d1d114224 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)\
if (len == 0) \
return -EINVAL; \
\
- val = simple_strtoul(cp, &tail, base); \
+ val = simple_strtou##type(cp, &tail, base); \
if ((*tail == '\0') || \
((len == (size_t)(tail - cp) + 1) && (*tail == '\n'))) {\
*res = val; \