Skip to content
Commit 180f87fc authored by Tom Rini's avatar Tom Rini
Browse files

mmc_write.c: Make mmc_berase do 32bit safe 64bit math



We want to see if the requested start or total block count are
unaligned.  We discard the whole numbers and only care about the
remainder.  Update the code to use div_u64_rem here and add a comment.

Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Cc: Bernhard Nortmann <bernhard.nortmann@web.de>
Reported-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
Signed-off-by: default avatarTom Rini <trini@konsulko.com>
Tested-by: default avatarBernhard Nortmann <bernhard.nortmann@web.de>
Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
parent 14ec12fa
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment