public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] mtd: tests : move ebcnt and pgcnt definitions before usage in printing.
@ 2011-02-03 11:45 Roman Tereshonkov
  2011-02-06 15:12 ` Artem Bityutskiy
  0 siblings, 1 reply; 2+ messages in thread
From: Roman Tereshonkov @ 2011-02-03 11:45 UTC (permalink / raw)
  To: linux-mtd; +Cc: Roman Tereshonkov, adrian.hunter

ebcnt and pgcnt variable initialization is moved before printk which
uses them.

Signed-off-by: Roman Tereshonkov <roman.tereshonkov@nokia.com>
---
 drivers/mtd/tests/mtd_subpagetest.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/mtd/tests/mtd_subpagetest.c b/drivers/mtd/tests/mtd_subpagetest.c
index 11204e8..334eae5 100644
--- a/drivers/mtd/tests/mtd_subpagetest.c
+++ b/drivers/mtd/tests/mtd_subpagetest.c
@@ -394,6 +394,11 @@ static int __init mtd_subpagetest_init(void)
 	}
 
 	subpgsize = mtd->writesize >> mtd->subpage_sft;
+	tmp = mtd->size;
+	do_div(tmp, mtd->erasesize);
+	ebcnt = tmp;
+	pgcnt = mtd->erasesize / mtd->writesize;
+
 	printk(PRINT_PREF "MTD device size %llu, eraseblock size %u, "
 	       "page size %u, subpage size %u, count of eraseblocks %u, "
 	       "pages per eraseblock %u, OOB size %u\n",
@@ -413,11 +418,6 @@ static int __init mtd_subpagetest_init(void)
 		goto out;
 	}
 
-	tmp = mtd->size;
-	do_div(tmp, mtd->erasesize);
-	ebcnt = tmp;
-	pgcnt = mtd->erasesize / mtd->writesize;
-
 	err = scan_for_bad_eraseblocks();
 	if (err)
 		goto out;
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mtd: tests : move ebcnt and pgcnt definitions before usage in printing.
  2011-02-03 11:45 [PATCH] mtd: tests : move ebcnt and pgcnt definitions before usage in printing Roman Tereshonkov
@ 2011-02-06 15:12 ` Artem Bityutskiy
  0 siblings, 0 replies; 2+ messages in thread
From: Artem Bityutskiy @ 2011-02-06 15:12 UTC (permalink / raw)
  To: Roman Tereshonkov; +Cc: linux-mtd, adrian.hunter

On Thu, 2011-02-03 at 13:45 +0200, Roman Tereshonkov wrote:
> ebcnt and pgcnt variable initialization is moved before printk which
> uses them.
> 
> Signed-off-by: Roman Tereshonkov <roman.tereshonkov@nokia.com>

Pushed to l2-mtd-2.6.git, thanks!

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-02-06 15:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-03 11:45 [PATCH] mtd: tests : move ebcnt and pgcnt definitions before usage in printing Roman Tereshonkov
2011-02-06 15:12 ` Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox