diff mbox series

mtd: nftl: clean up indentation, remove extraneous tabs

Message ID 20181118163656.30698-1-colin.king@canonical.com
State Accepted
Delegated to: Boris Brezillon
Headers show
Series mtd: nftl: clean up indentation, remove extraneous tabs | expand

Commit Message

Colin Ian King Nov. 18, 2018, 4:36 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

The hunk of code is indented too much by one level, fix this by
removing the extraneous tabs. Also terminate block comment using
the recommended coding style to clean up checkpatch warning.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/mtd/nftlmount.c | 39 ++++++++++++++++++++-------------------
 1 file changed, 20 insertions(+), 19 deletions(-)

Comments

Boris Brezillon Dec. 3, 2018, 7:52 a.m. UTC | #1
On Sun, 2018-11-18 at 16:36:56 UTC, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The hunk of code is indented too much by one level, fix this by
> removing the extraneous tabs. Also terminate block comment using
> the recommended coding style to clean up checkpatch warning.
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied to http://git.infradead.org/linux-mtd.git mtd/next, thanks.

Boris
diff mbox series

Patch

diff --git a/drivers/mtd/nftlmount.c b/drivers/mtd/nftlmount.c
index 91b7fb326f9a..334aa5b3a655 100644
--- a/drivers/mtd/nftlmount.c
+++ b/drivers/mtd/nftlmount.c
@@ -346,25 +346,26 @@  int NFTL_formatblock(struct NFTLrecord *nftl, int block)
 		goto fail;
 	}
 
-		/* increase and write Wear-Leveling info */
-		nb_erases = le32_to_cpu(uci.WearInfo);
-		nb_erases++;
-
-		/* wrap (almost impossible with current flash) or free block */
-		if (nb_erases == 0)
-			nb_erases = 1;
-
-		/* check the "freeness" of Erase Unit before updating metadata
-		 * FixMe:  is this check really necessary ? since we have check the
-		 *         return code after the erase operation. */
-		if (check_free_sectors(nftl, instr->addr, nftl->EraseSize, 1) != 0)
-			goto fail;
-
-		uci.WearInfo = le32_to_cpu(nb_erases);
-		if (nftl_write_oob(mtd, block * nftl->EraseSize + SECTORSIZE +
-				   8, 8, &retlen, (char *)&uci) < 0)
-			goto fail;
-		return 0;
+	/* increase and write Wear-Leveling info */
+	nb_erases = le32_to_cpu(uci.WearInfo);
+	nb_erases++;
+
+	/* wrap (almost impossible with current flash) or free block */
+	if (nb_erases == 0)
+		nb_erases = 1;
+
+	/* check the "freeness" of Erase Unit before updating metadata
+	 * FixMe:  is this check really necessary ? since we have check the
+	 *         return code after the erase operation.
+	 */
+	if (check_free_sectors(nftl, instr->addr, nftl->EraseSize, 1) != 0)
+		goto fail;
+
+	uci.WearInfo = le32_to_cpu(nb_erases);
+	if (nftl_write_oob(mtd, block * nftl->EraseSize + SECTORSIZE +
+			   8, 8, &retlen, (char *)&uci) < 0)
+		goto fail;
+	return 0;
 fail:
 	/* could not format, update the bad block table (caller is responsible
 	   for setting the ReplUnitTable to BLOCK_RESERVED on failure) */