Searched hist:cdfd1ac6df16f11fa00e30a76e3c37d61c24b7fa (Results 1 – 1 of 1) sorted by relevance
/openbmc/u-boot/drivers/mmc/ |
H A D | mmc.c | diff cdfd1ac6df16f11fa00e30a76e3c37d61c24b7fa Thu Jun 07 14:09:11 CDT 2012 Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> mmc: fix capacity calculation when EXT_CSD_SEC_CNT is used
Since the type of "ext_csd" was array of char, the following calculation might fail when the value of ext_csd[EXT_CSD_SEC_CNT] was minus.
capacity = ext_csd[EXT_CSD_SEC_CNT] << 0 | ext_csd[EXT_CSD_SEC_CNT + 1] << 8 | ext_csd[EXT_CSD_SEC_CNT + 2] << 16 | ext_csd[EXT_CSD_SEC_CNT + 3] << 24;
So, this patch changes the type of "ext_csd" to array of u8.
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Andy Fleming <afleming@freescale.com>
|