[PATCH 05/10] imx-bbu-nand-fcb: Fix debug messages
Sascha Hauer
s.hauer at pengutronix.de
Thu Jun 11 23:35:41 PDT 2015
We should print the block number before increasing it, not afterwards.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
common/imx-bbu-nand-fcb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/common/imx-bbu-nand-fcb.c b/common/imx-bbu-nand-fcb.c
index d2bfedb..5b984d4 100644
--- a/common/imx-bbu-nand-fcb.c
+++ b/common/imx-bbu-nand-fcb.c
@@ -275,8 +275,8 @@ static int imx6_bbu_erase(struct mtd_info *mtd)
while (len > 0) {
pr_debug("erasing at 0x%08llx\n", offset);
if (mtd_block_isbad(mtd, offset)) {
- offset += mtd->erasesize;
pr_debug("erase skip block @ 0x%08llx\n", offset);
+ offset += mtd->erasesize;
continue;
}
@@ -308,9 +308,9 @@ static int imx6_bbu_write_firmware(struct mtd_info *mtd, int block, void *buf, s
buf, offset, len);
if (mtd_block_isbad(mtd, offset)) {
+ pr_debug("write skip block @ 0x%08llx\n", offset);
offset += mtd->erasesize;
block++;
- pr_debug("write skip block @ 0x%08llx\n", offset);
continue;
}
--
2.1.4
More information about the barebox
mailing list