diff options
author | Roman Tereshonkov <roman.tereshonkov@nokia.com> | 2011-02-03 12:45:56 +0100 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2011-03-11 15:22:44 +0100 |
commit | 7b7e905ec2ec511e06279181ca95a892db21e292 (patch) | |
tree | 235fac2b1b206f5644de4fabae7148951c694ba7 /drivers/mtd/tests | |
parent | mtd: ts5500_flash: avoid calling map_destroy on NULL (diff) | |
download | linux-7b7e905ec2ec511e06279181ca95a892db21e292.tar.xz linux-7b7e905ec2ec511e06279181ca95a892db21e292.zip |
mtd: tests: print correct values
The ebcnt and pgcnt variable initialization is moved before printk
which uses them.
Signed-off-by: Roman Tereshonkov <roman.tereshonkov@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/tests')
-rw-r--r-- | 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 11204e8aab5f..334eae53a3db 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; |