Skip to contentSkip to conversation

doc, bitmap: Fix kernel-doc for bitmap_parselist(), bitmap_parselist_user()

PATCH New Ben Hutchings 1 participant 1 message Apr 14, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 doc, bitmap: Fix kernel-doc for bitmap_parselist(), bitmap_parselist_user()

Move and adjust kernel-doc from __bitmap_parselist() to bitmap_parselist(), as only the latter is declared extern.

Fix the summary line for bitmap_parselist_user().

Replace outdated statement that bitmap_parselist_user() is a wraper for bitmap_parselist() with the relevant fact that it has the same range of return values.

---
 lib/bitmap.c |   41 +++++++++++++++++++----------------------
 1 file changed, 19 insertions(+), 22 deletions(-)
lib/bitmap.c +19 -22
index 0d4a127..38c2a1c 100644
@@ -570,26 +570,6 @@ int bitmap_scnlistprintf(char *buf, unsigned int buflen,
 }
 EXPORT_SYMBOL(bitmap_scnlistprintf);
 
-/**
- * __bitmap_parselist - convert list format ASCII string to bitmap
- * @buf: read nul-terminated user string from this buffer
- * @buflen: buffer size in bytes.  If string is smaller than this
- *    then it must be terminated with a \0.
- * @is_user: location of buffer, 0 indicates kernel space
- * @maskp: write resulting mask here
- * @nmaskbits: number of bits in mask to be written
- *
- * Input format is a comma-separated list of decimal numbers and
- * ranges.  Consecutively set bits are shown as two hyphen-separated
- * decimal numbers, the smallest and largest bit numbers set in
- * the range.
- *
- * Returns 0 on success, -errno on invalid input strings.
- * Error values:
- *    %-EINVAL: second number in range smaller than first
- *    %-EINVAL: invalid character in string
- *    %-ERANGE: bit number specified too large for mask
- */
 static int __bitmap_parselist(const char *buf, unsigned int buflen,
 		int is_user, unsigned long *maskp,
 		int nmaskbits)
@@ -660,6 +640,23 @@ static int __bitmap_parselist(const char *buf, unsigned int buflen,
 	return 0;
 }
 
+/**
+ * bitmap_parselist - convert list format ASCII string to bitmap
+ * @bp: read nul-terminated string from this buffer
+ * @maskp: write resulting mask here
+ * @nmaskbits: number of bits in mask to be written
+ *
+ * Input format is a comma-separated list of decimal numbers and
+ * ranges.  Consecutively set bits are shown as two hyphen-separated
+ * decimal numbers, the smallest and largest bit numbers set in
+ * the range.
+ *
+ * Returns 0 on success, -errno on invalid input strings.
+ * Error values:
+ *    %-EINVAL: second number in range smaller than first
+ *    %-EINVAL: invalid character in string
+ *    %-ERANGE: bit number specified too large for mask
+ */
 int bitmap_parselist(const char *bp, unsigned long *maskp, int nmaskbits)
 {
 	char *nl  = strchr(bp, '\n');
@@ -676,7 +673,7 @@ EXPORT_SYMBOL(bitmap_parselist);
 
 
 /**
- * bitmap_parselist_user()
+ * bitmap_parselist_user - convert list format ASCII user buffer to bitmap
  *
  * @ubuf: pointer to user buffer containing string.
  * @ulen: buffer size in bytes.  If string is smaller than this
@@ -684,7 +681,7 @@ EXPORT_SYMBOL(bitmap_parselist);
  * @maskp: pointer to bitmap array that will contain result.
  * @nmaskbits: size of bitmap, in bits.
  *
- * Wrapper for bitmap_parselist(), providing it with user buffer.
+ * Return values are as for bitmap_parselist().
  *
  * We cannot have this as an inline function in bitmap.h because it needs
  * linux/uaccess.h to get the access_ok() declaration and this causes
Signature · 1 line
1.7.9.5