nand: Clean up nand_util

This patch cleans up nand_util.c:
 - Fix tabs.
 - Fix typos.
 - Remove space character before opening parenthesis in function calls.
 - Fix comments.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Scott Wood <scottwood@freescale.com>
This commit is contained in:
Benoît Thébaudeau 2012-11-05 10:15:46 +00:00 committed by Scott Wood
parent c788ecfdc3
commit bd74280d62

View File

@ -59,7 +59,7 @@ typedef struct mtd_info mtd_info_t;
/**
* nand_erase_opts: - erase NAND flash with support for various options
* (jffs2 formating)
* (jffs2 formatting)
*
* @param meminfo NAND device to erase
* @param opts options, @see struct nand_erase_options
@ -81,7 +81,7 @@ int nand_erase_opts(nand_info_t *meminfo, const nand_erase_options_t *opts)
struct nand_chip *chip = meminfo->priv;
if ((opts->offset & (meminfo->writesize - 1)) != 0) {
printf("Attempt to erase non page aligned data\n");
printf("Attempt to erase non page-aligned data\n");
return -1;
}
@ -259,7 +259,7 @@ int nand_lock(struct mtd_info *mtd, int tight)
* flash
*
* @param mtd nand mtd instance
* @param offset page address to query (muss be page aligned!)
* @param offset page address to query (must be page-aligned!)
*
* @return -1 in case of error
* >0 lock status:
@ -507,7 +507,7 @@ int nand_write_skip_bad(nand_info_t *nand, loff_t offset, size_t *length,
* partition boundary). So don't try to handle that.
*/
if ((offset & (nand->writesize - 1)) != 0) {
printf ("Attempt to write non page aligned data\n");
printf("Attempt to write non page-aligned data\n");
*length = 0;
return -EINVAL;
}
@ -608,13 +608,13 @@ int nand_write_skip_bad(nand_info_t *nand, loff_t offset, size_t *length,
* nand_read_skip_bad:
*
* Read image from NAND flash.
* Blocks that are marked bad are skipped and the next block is readen
* Blocks that are marked bad are skipped and the next block is read
* instead as long as the image is short enough to fit even after skipping the
* bad blocks.
*
* @param nand NAND device
* @param offset offset in flash
* @param length buffer length, on return holds remaining bytes to read
* @param length buffer length, on return holds number of read bytes
* @param buffer buffer to write to
* @return 0 in case of success
*/
@ -627,7 +627,7 @@ int nand_read_skip_bad(nand_info_t *nand, loff_t offset, size_t *length,
int need_skip;
if ((offset & (nand->writesize - 1)) != 0) {
printf ("Attempt to read non page aligned data\n");
printf("Attempt to read non page-aligned data\n");
*length = 0;
return -EINVAL;
}