Hello Daniel Kurtz,
I'd like you to do a code review. Please visit
https://review.coreboot.org/22505
to review the following change.
Change subject: linux_mtd: fix mtd_wp_status ......................................................................
linux_mtd: fix mtd_wp_status
Fix invalid loop range in mtd_wp_status, which ends the for loop prematurely.
BUG=chrome-os-partner:40208 TEST=`flashrom --wp-status` should output something like: 'WP: write protect range: start=0x00001000, len=0x0000efff'
Change-Id: Ic582bb034c0d2f811813fb6a25696ccddef43e8f Reviewed-on: https://chromium-review.googlesource.com/329927 Commit-Ready: Wei-Ning Huang wnhuang@chromium.org Tested-by: Wei-Ning Huang wnhuang@chromium.org Reviewed-by: Daniel Kurtz djkurtz@chromium.org --- M linux_mtd.c 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/05/22505/1
diff --git a/linux_mtd.c b/linux_mtd.c index d8d835d..c707167 100644 --- a/linux_mtd.c +++ b/linux_mtd.c @@ -480,7 +480,7 @@
/* For now, assume only one contiguous region can be locked (NOR) */ /* FIXME: use flash struct members instead of raw MTD values here */ - for (u = 0; u < mtd_total_size / mtd_erasesize; u += mtd_erasesize) { + for (u = 0; u < mtd_total_size; u += mtd_erasesize) { int rc; struct erase_info_user erase_info = { .start = u,