mmc_write.c: Make mmc_berase do 32bit safe 64bit math
authorTom Rini <trini@konsulko.com>
Fri, 12 Jun 2015 00:53:31 +0000 (20:53 -0400)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 8 Sep 2015 22:42:51 +0000 (00:42 +0200)
commit2c3129df34ba163520b18b07104bf3803595a440
tree4b7a494a97491d916cd96ac4034ea49911646411
parenta4b4ccc3625ffb97ca799d845a5615e4b1ccd96f
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 <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tested-by: Bernhard Nortmann <bernhard.nortmann@web.de>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
drivers/mmc/mmc_write.c