[MTD][MTDPART] Cleanup and document the erase region handling
[MTD][MTDPART] Cleanup and document the erase region handling

Mostly simplifying the loops.  Now everything fits into 80 columns,
is easier to read and the finer details have extra comments.

Signed-off-by: Jörn Engel <aea8d21973be359ec7d72dd5882345200e3616a6@logfs.org>
Signed-off-by: Atsushi Nemoto <80aeab2fcc576fb9134b563f36af765199d49e90@mba.ocn.ne.jp>
Signed-off-by: David Woodhouse <b460d66aaf00c296a3db1c1d9eeafc081d5f7d70@intel.com>

KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas