Commit 6e1907ff authored by Randy Dunlap's avatar Randy Dunlap Committed by Linus Torvalds

[PATCH] kernel-doc for lib/bitmap.c

Make corrections/fixes to kernel-doc in lib/bitmap.c and include it in DocBook
template.
Signed-off-by: default avatarRandy Dunlap <rdunlap@xenotime.net>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 099a71d9
...@@ -112,6 +112,10 @@ X!Ilib/string.c ...@@ -112,6 +112,10 @@ X!Ilib/string.c
<sect1><title>Bit Operations</title> <sect1><title>Bit Operations</title>
!Iinclude/asm-i386/bitops.h !Iinclude/asm-i386/bitops.h
</sect1> </sect1>
<sect1><title>Bitmap Operations</title>
!Elib/bitmap.c
!Ilib/bitmap.c
</sect1>
</chapter> </chapter>
<chapter id="mm"> <chapter id="mm">
......
...@@ -317,16 +317,16 @@ EXPORT_SYMBOL(bitmap_scnprintf); ...@@ -317,16 +317,16 @@ EXPORT_SYMBOL(bitmap_scnprintf);
/** /**
* bitmap_parse - convert an ASCII hex string into a bitmap. * bitmap_parse - convert an ASCII hex string into a bitmap.
* @buf: pointer to buffer in user space containing string. * @ubuf: pointer to buffer in user space containing string.
* @buflen: buffer size in bytes. If string is smaller than this * @ubuflen: buffer size in bytes. If string is smaller than this
* then it must be terminated with a \0. * then it must be terminated with a \0.
* @maskp: pointer to bitmap array that will contain result. * @maskp: pointer to bitmap array that will contain result.
* @nmaskbits: size of bitmap, in bits. * @nmaskbits: size of bitmap, in bits.
* *
* Commas group hex digits into chunks. Each chunk defines exactly 32 * Commas group hex digits into chunks. Each chunk defines exactly 32
* bits of the resultant bitmask. No chunk may specify a value larger * bits of the resultant bitmask. No chunk may specify a value larger
* than 32 bits (-EOVERFLOW), and if a chunk specifies a smaller value * than 32 bits (%-EOVERFLOW), and if a chunk specifies a smaller value
* then leading 0-bits are prepended. -EINVAL is returned for illegal * then leading 0-bits are prepended. %-EINVAL is returned for illegal
* characters and for grouping errors such as "1,,5", ",44", "," and "". * characters and for grouping errors such as "1,,5", ",44", "," and "".
* Leading and trailing whitespace accepted, but not embedded whitespace. * Leading and trailing whitespace accepted, but not embedded whitespace.
*/ */
...@@ -452,8 +452,8 @@ EXPORT_SYMBOL(bitmap_scnlistprintf); ...@@ -452,8 +452,8 @@ EXPORT_SYMBOL(bitmap_scnlistprintf);
/** /**
* bitmap_parselist - convert list format ASCII string to bitmap * bitmap_parselist - convert list format ASCII string to bitmap
* @buf: read nul-terminated user string from this buffer * @bp: read nul-terminated user string from this buffer
* @mask: write resulting mask here * @maskp: write resulting mask here
* @nmaskbits: number of bits in mask to be written * @nmaskbits: number of bits in mask to be written
* *
* Input format is a comma-separated list of decimal numbers and * Input format is a comma-separated list of decimal numbers and
...@@ -461,10 +461,11 @@ EXPORT_SYMBOL(bitmap_scnlistprintf); ...@@ -461,10 +461,11 @@ EXPORT_SYMBOL(bitmap_scnlistprintf);
* decimal numbers, the smallest and largest bit numbers set in * decimal numbers, the smallest and largest bit numbers set in
* the range. * the range.
* *
* Returns 0 on success, -errno on invalid input strings: * Returns 0 on success, -errno on invalid input strings.
* -EINVAL: second number in range smaller than first * Error values:
* -EINVAL: invalid character in string * %-EINVAL: second number in range smaller than first
* -ERANGE: bit number specified too large for mask * %-EINVAL: invalid character in string
* %-ERANGE: bit number specified too large for mask
*/ */
int bitmap_parselist(const char *bp, unsigned long *maskp, int nmaskbits) int bitmap_parselist(const char *bp, unsigned long *maskp, int nmaskbits)
{ {
...@@ -625,10 +626,10 @@ EXPORT_SYMBOL(bitmap_remap); ...@@ -625,10 +626,10 @@ EXPORT_SYMBOL(bitmap_remap);
/** /**
* bitmap_bitremap - Apply map defined by a pair of bitmaps to a single bit * bitmap_bitremap - Apply map defined by a pair of bitmaps to a single bit
* @oldbit - bit position to be mapped * @oldbit: bit position to be mapped
* @old: defines domain of map * @old: defines domain of map
* @new: defines range of map * @new: defines range of map
* @bits: number of bits in each of these bitmaps * @bits: number of bits in each of these bitmaps
* *
* Let @old and @new define a mapping of bit positions, such that * Let @old and @new define a mapping of bit positions, such that
* whatever position is held by the n-th set bit in @old is mapped * whatever position is held by the n-th set bit in @old is mapped
...@@ -790,7 +791,7 @@ EXPORT_SYMBOL(bitmap_release_region); ...@@ -790,7 +791,7 @@ EXPORT_SYMBOL(bitmap_release_region);
* *
* Allocate (set bits in) a specified region of a bitmap. * Allocate (set bits in) a specified region of a bitmap.
* *
* Return 0 on success, or -EBUSY if specified region wasn't * Return 0 on success, or %-EBUSY if specified region wasn't
* free (not all bits were zero). * free (not all bits were zero).
*/ */
int bitmap_allocate_region(unsigned long *bitmap, int pos, int order) int bitmap_allocate_region(unsigned long *bitmap, int pos, int order)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment