Fix NAND erase progress error
Subsystems (2)
PATCH 1/1 Fix NAND erase progress error
drivers/mtd/nand/nand_util.c +8 -3
@@ -209,10 +209,15 @@ int nand_erase_opts(nand_info_t *meminfo, const nand_erase_options_t *opts) }if (!opts->quiet) { -unsigned long long n =(unsigned long long ) - (erase.addr + meminfo->erasesize - opts->offset) - *100 ; +unsigned long long n;int percent; +size_t erased_size = erase.addr - opts->offset + meminfo->erasesize; + +if (erased_size > erase_length) { + erased_size = erase_length; + } + + n = (unsigned long long ) erased_size *100 ;do_div (n, erase_length); percent = (int )n;
PATCH 1/1 Fix NAND erase progress error
drivers/mtd/nand/nand_util.c
Quoted 4 lines · In message <[email protected]> you…
drivers/mtd/nand/nand_util.c +0
-0
Please describe what the error is, nd add your signed-off-by line.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "What is wanted is not the will to believe, but the will to find out, which is the exact opposite." - Bertrand Russell, _Sceptical_Essays_, 1928