Skip to content
Commit 212875e7 authored by Patrick Delaunay's avatar Patrick Delaunay Committed by Jaehoon Chung
Browse files

mmc: fix error message for unaligned erase request



Fix the end address in the message for unaligned erase request in
mmc_berase() when start + blkcnt is aligned to erase_grp_size.

for example:
  - start = 0x2000 - 26
  - count = 26
  - erase_grp_size = 0x400

  Caution! Your devices Erase group is 0x400
  The erase range would be change to 0x2000~0x27ff

But no issue when the end address is not aligned, for example
  - start = 0x2000 - 2 * 26
  - count = 26
  - erase_grp_size = 0x400

  Caution! Your devices Erase group is 0x400
  The erase range would be change to 0x2000~0x23ff

Signed-off-by: default avatarPatrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: default avatarJaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: default avatarPatrice Chotard <patrice.chotard@foss.st.com>
parent c18e5fb0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment