mtd/nand_base: fix kernel-doc warnings & typos

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Tue Aug 10 21:59:01 EDT 2010


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=db9ebb7cd0b6329c46ba3cc326d6414647fcfe6b
Commit:     db9ebb7cd0b6329c46ba3cc326d6414647fcfe6b
Parent:     7cfffac06ca0d45040db228ce1835f5cf8623916
Author:     Randy Dunlap <randy.dunlap at oracle.com>
AuthorDate: Mon May 24 22:22:51 2010 -0700
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Wed Aug 11 00:29:15 2010 +0100

    mtd/nand_base: fix kernel-doc warnings & typos
    
    Fix mtd/nand_base.c kernel-doc warnings and typos.
    
    Warning(drivers/mtd/nand/nand_base.c:893): No description found for parameter 'mtd'
    Warning(drivers/mtd/nand/nand_base.c:893): No description found for parameter 'ofs'
    Warning(drivers/mtd/nand/nand_base.c:893): No description found for parameter 'len'
    Warning(drivers/mtd/nand/nand_base.c:893): No description found for parameter 'invert'
    Warning(drivers/mtd/nand/nand_base.c:930): No description found for parameter 'mtd'
    Warning(drivers/mtd/nand/nand_base.c:930): No description found for parameter 'ofs'
    Warning(drivers/mtd/nand/nand_base.c:930): No description found for parameter 'len'
    Warning(drivers/mtd/nand/nand_base.c:987): No description found for parameter 'mtd'
    Warning(drivers/mtd/nand/nand_base.c:987): No description found for parameter 'ofs'
    Warning(drivers/mtd/nand/nand_base.c:987): No description found for parameter 'len'
    Warning(drivers/mtd/nand/nand_base.c:2087): No description found for parameter 'len'
    
    Signed-off-by: Randy Dunlap <randy.dunlap at oracle.com>
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
 drivers/mtd/nand/nand_base.c |   39 ++++++++++++++++++++-------------------
 scripts/kernel-doc           |    2 ++
 2 files changed, 22 insertions(+), 19 deletions(-)

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 16a1714..a3c7473 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -889,17 +889,17 @@ static int nand_wait(struct mtd_info *mtd, struct nand_chip *chip)
 }
 
 /**
- * __nand_unlock - [REPLACABLE] unlocks specified locked blockes
+ * __nand_unlock - [REPLACEABLE] unlocks specified locked blocks
  *
- * @param mtd - mtd info
- * @param ofs - offset to start unlock from
- * @param len - length to unlock
- * @invert -  when = 0, unlock the range of blocks within the lower and
+ * @mtd: mtd info
+ * @ofs: offset to start unlock from
+ * @len: length to unlock
+ * @invert:   when = 0, unlock the range of blocks within the lower and
  *                      upper boundary address
- *            whne = 1, unlock the range of blocks outside the boundaries
+ *            when = 1, unlock the range of blocks outside the boundaries
  *                      of the lower and upper boundary address
  *
- * @return - unlock status
+ * return - unlock status
  */
 static int __nand_unlock(struct mtd_info *mtd, loff_t ofs,
 					uint64_t len, int invert)
@@ -931,13 +931,13 @@ static int __nand_unlock(struct mtd_info *mtd, loff_t ofs,
 }
 
 /**
- * nand_unlock - [REPLACABLE] unlocks specified locked blockes
+ * nand_unlock - [REPLACEABLE] unlocks specified locked blocks
  *
- * @param mtd - mtd info
- * @param ofs - offset to start unlock from
- * @param len - length to unlock
+ * @mtd: mtd info
+ * @ofs: offset to start unlock from
+ * @len: length to unlock
  *
- * @return - unlock status
+ * return - unlock status
  */
 int nand_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len)
 {
@@ -982,16 +982,16 @@ out:
 }
 
 /**
- * nand_lock - [REPLACABLE] locks all blockes present in the device
+ * nand_lock - [REPLACEABLE] locks all blocks present in the device
  *
- * @param mtd - mtd info
- * @param ofs - offset to start unlock from
- * @param len - length to unlock
+ * @mtd: mtd info
+ * @ofs: offset to start unlock from
+ * @len: length to unlock
  *
- * @return - lock status
+ * return - lock status
  *
- * This feature is not support in many NAND parts. 'Micron' NAND parts
- * do have this feature, but it allows only to lock all blocks not for
+ * This feature is not supported in many NAND parts. 'Micron' NAND parts
+ * do have this feature, but it allows only to lock all blocks, not for
  * specified range for block.
  *
  * Implementing 'lock' feature by making use of 'unlock', for now.
@@ -2093,6 +2093,7 @@ static int nand_write_page(struct mtd_info *mtd, struct nand_chip *chip,
  * nand_fill_oob - [Internal] Transfer client buffer to oob
  * @chip:	nand chip structure
  * @oob:	oob data buffer
+ * @len:	oob data write length
  * @ops:	oob ops structure
  */
 static uint8_t *nand_fill_oob(struct nand_chip *chip, uint8_t *oob, size_t len,
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index fcdfb24..102e123 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -1454,6 +1454,8 @@ sub dump_enum($$) {
     my $file = shift;
 
     $x =~ s@/\*.*?\*/@@gos;	# strip comments.
+    $x =~ s/^#\s*define\s+.*$//; # strip #define macros inside enums
+
     if ($x =~ /enum\s+(\w+)\s*{(.*)}/) {
 	$declaration_name = $1;
 	my $members = $2;



More information about the linux-mtd-cvs mailing list