[U-Boot-Users] [PATCH] NAND: Coding-style fixes

Guennadi Liakhovetski lg at denx.de
Thu Jul 31 12:42:43 CEST 2008


Signed-off-by: Guennadi Liakhovetski <lg at denx.de>
---
 drivers/mtd/nand/nand_base.c |   33 +++++++++++++++++----------------
 1 files changed, 17 insertions(+), 16 deletions(-)

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 6416d15..49bf51d 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -596,7 +596,7 @@ static void nand_command (struct mtd_info *mtd, unsigned command, int column, in
 	/*
 	 * program and erase have their own busy handlers
 	 * status and sequential in needs no delay
-	*/
+	 */
 	switch (command) {
 
 	case NAND_CMD_PAGEPROG:
@@ -621,7 +621,7 @@ static void nand_command (struct mtd_info *mtd, unsigned command, int column, in
 		/*
 		 * If we don't have access to the busy pin, we apply the given
 		 * command delay
-		*/
+		 */
 		if (!this->dev_ready) {
 			udelay (this->chip_delay);
 			return;
@@ -690,7 +690,7 @@ static void nand_command_lp (struct mtd_info *mtd, unsigned command, int column,
 	/*
 	 * program and erase have their own busy handlers
 	 * status and sequential in needs no delay
-	*/
+	 */
 	switch (command) {
 
 	case NAND_CMD_CACHEDPROG:
@@ -726,7 +726,7 @@ static void nand_command_lp (struct mtd_info *mtd, unsigned command, int column,
 		/*
 		 * If we don't have access to the busy pin, we apply the given
 		 * command delay
-		*/
+		 */
 		if (!this->dev_ready) {
 			udelay (this->chip_delay);
 			return;
@@ -758,7 +758,7 @@ static void nand_get_device (struct nand_chip *this, struct mtd_info *mtd, int n
 
 	/*
 	 * Grab the lock and see if the device is available
-	*/
+	 */
 retry:
 	/* Hardware controller shared among independend devices */
 	if (this->controller) {
@@ -1070,7 +1070,7 @@ static int nand_verify_pages (struct mtd_info *mtd, struct nand_chip *this, int
 		 * is marked as NOAUTOINCR by the board driver.
 		 * Do this also before returning, so the chip is
 		 * ready for the next command.
-		*/
+		 */
 		if (!this->dev_ready)
 			udelay (this->chip_delay);
 		else
@@ -1153,13 +1153,13 @@ static int nand_read_ecc (struct mtd_info *mtd, loff_t from, size_t len,
 	}
 
 	/* Grab the lock and see if the device is available */
-	nand_get_device (this, mtd ,FL_READING);
+	nand_get_device (this, mtd, FL_READING);
 
 	/* use userspace supplied oobinfo, if zero */
 	if (oobsel == NULL)
 		oobsel = &mtd->oobinfo;
 
-	/* Autoplace of oob data ? Use the default placement scheme */
+	/* Autoplace of oob data? Use the default placement scheme */
 	if (oobsel->useecc == MTD_NANDECC_AUTOPLACE)
 		oobsel = this->autooob;
 
@@ -1346,7 +1346,7 @@ static int nand_read_ecc (struct mtd_info *mtd, loff_t from, size_t len,
 		 * Do this before the AUTOINCR check, so no problems
 		 * arise if a chip which does auto increment
 		 * is marked as NOAUTOINCR by the board driver.
-		*/
+		 */
 		if (!this->dev_ready)
 			udelay (this->chip_delay);
 		else
@@ -1369,7 +1369,7 @@ static int nand_read_ecc (struct mtd_info *mtd, loff_t from, size_t len,
 		}
 		/* Check, if the chip supports auto page increment
 		 * or if we have hit a block boundary.
-		*/
+		 */
 		if (!NAND_CANAUTOINCR(this) || !(page & blockcheck))
 			sndcmd = 1;
 	}
@@ -1446,7 +1446,7 @@ static int nand_read_oob (struct mtd_info *mtd, loff_t from, size_t len, size_t
 		 * Do this before the AUTOINCR check, so no problems
 		 * arise if a chip which does auto increment
 		 * is marked as NOAUTOINCR by the board driver.
-		*/
+		 */
 		if (!this->dev_ready)
 			udelay (this->chip_delay);
 		else
@@ -1466,7 +1466,7 @@ static int nand_read_oob (struct mtd_info *mtd, loff_t from, size_t len, size_t
 
 			/* Check, if the chip supports auto page increment
 			 * or if we have hit a block boundary.
-			*/
+			 */
 			if (!NAND_CANAUTOINCR(this) || !(page & blockcheck)) {
 				/* For subsequent page reads set offset to 0 */
 				this->cmdfunc (mtd, NAND_CMD_READOOB, 0x0, page & this->pagemask);
@@ -1731,7 +1731,7 @@ static int nand_write_ecc (struct mtd_info *mtd, loff_t to, size_t len,
 		/* Have we hit a block boundary ? Then we have to verify and
 		 * if verify is ok, we have to setup the oob buffer for
 		 * the next pages.
-		*/
+		 */
 		if (!(page & (ppblock - 1))){
 			int ofs;
 			this->data_poi = bufstart;
@@ -2376,7 +2376,8 @@ int nand_scan (struct mtd_info *mtd, int maxchips)
 		if (nand_dev_id != nand_flash_ids[i].id)
 			continue;
 
-		if (!mtd->name) mtd->name = nand_flash_ids[i].name;
+		if (!mtd->name)
+			mtd->name = nand_flash_ids[i].name;
 		this->chipsize = nand_flash_ids[i].chipsize << 20;
 
 		/* New devices have all the information in additional id bytes */
@@ -2549,7 +2550,7 @@ int nand_scan (struct mtd_info *mtd, int maxchips)
 	 * check ECC mode, default to software
 	 * if 3byte/512byte hardware ECC is selected and we have 256 byte pagesize
 	 * fallback to software ECC
-	*/
+	 */
 	this->eccsize = 256;	/* set default eccsize */
 	this->eccbytes = 3;
 
@@ -2597,7 +2598,7 @@ int nand_scan (struct mtd_info *mtd, int maxchips)
 
 	/* Check hardware ecc function availability and adjust number of ecc bytes per
 	 * calculation step
-	*/
+	 */
 	switch (this->eccmode) {
 	case NAND_ECC_HW12_2048:
 		this->eccbytes += 4;
-- 
1.5.4





More information about the U-Boot mailing list