summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2018-11-18 11:36:56 -0500
committerBoris Brezillon <boris.brezillon@bootlin.com>2018-12-02 03:20:36 -0500
commit4845a077c0b9c5c10422a090dbd1d894233f9456 (patch)
treefb9b34c65157a3c137e63398289f6474a5f089ae
parenta788c5272769ddbcdbab297cf386413eeac04463 (diff)
mtd: nftl: clean up indentation, remove extraneous tabs
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> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
-rw-r--r--drivers/mtd/nftlmount.c39
1 files changed, 20 insertions, 19 deletions
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)
346 goto fail; 346 goto fail;
347 } 347 }
348 348
349 /* increase and write Wear-Leveling info */ 349 /* increase and write Wear-Leveling info */
350 nb_erases = le32_to_cpu(uci.WearInfo); 350 nb_erases = le32_to_cpu(uci.WearInfo);
351 nb_erases++; 351 nb_erases++;
352 352
353 /* wrap (almost impossible with current flash) or free block */ 353 /* wrap (almost impossible with current flash) or free block */
354 if (nb_erases == 0) 354 if (nb_erases == 0)
355 nb_erases = 1; 355 nb_erases = 1;
356 356
357 /* check the "freeness" of Erase Unit before updating metadata 357 /* check the "freeness" of Erase Unit before updating metadata
358 * FixMe: is this check really necessary ? since we have check the 358 * FixMe: is this check really necessary ? since we have check the
359 * return code after the erase operation. */ 359 * return code after the erase operation.
360 if (check_free_sectors(nftl, instr->addr, nftl->EraseSize, 1) != 0) 360 */
361 goto fail; 361 if (check_free_sectors(nftl, instr->addr, nftl->EraseSize, 1) != 0)
362 362 goto fail;
363 uci.WearInfo = le32_to_cpu(nb_erases); 363
364 if (nftl_write_oob(mtd, block * nftl->EraseSize + SECTORSIZE + 364 uci.WearInfo = le32_to_cpu(nb_erases);
365 8, 8, &retlen, (char *)&uci) < 0) 365 if (nftl_write_oob(mtd, block * nftl->EraseSize + SECTORSIZE +
366 goto fail; 366 8, 8, &retlen, (char *)&uci) < 0)
367 return 0; 367 goto fail;
368 return 0;
368fail: 369fail:
369 /* could not format, update the bad block table (caller is responsible 370 /* could not format, update the bad block table (caller is responsible
370 for setting the ReplUnitTable to BLOCK_RESERVED on failure) */ 371 for setting the ReplUnitTable to BLOCK_RESERVED on failure) */