public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Powerpc eSDHC: Convert the cmd_timeou_ms to u64 to avoid overflow
@ 2012-11-26  8:35 Haijun Zhang
  2012-11-26  8:35 ` [PATCH] Use u64 to calculate the timeout value " Haijun Zhang
  2012-11-26  9:12 ` [PATCH] Powerpc eSDHC: Convert the cmd_timeou_ms to u64 " Anton Vorontsov
  0 siblings, 2 replies; 5+ messages in thread
From: Haijun Zhang @ 2012-11-26  8:35 UTC (permalink / raw)
  To: linux-mmc; +Cc: Haijun Zhang, Jerry Huang, Anton Vorontsov, Chris Ball

Convert the cmd_timeou_ms to u64 to avoid overflow

Signed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com>
Signed-off-by: Haijun Zhang <Haijun.Zhang@freescale.com>
CC: Anton Vorontsov <cbouatmailru@gmail.com>
CC: Chris Ball <cjb@laptop.org>
---
 drivers/mmc/card/block.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index 21056b9..51903de 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -469,7 +469,8 @@ static int mmc_blk_ioctl_cmd(struct block_device *bdev,
 			 *     mrq.data = NULL;
 			 *     cmd.cmd_timeout = idata->ic.cmd_timeout_ms;
 			 */
-			data.timeout_ns = idata->ic.cmd_timeout_ms * 1000000;
+			data.timeout_ns = (u64)idata->ic.cmd_timeout_ms *
+						1000000;
 		}
 
 		mrq.data = &data;
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-11-26  9:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-26  8:35 [PATCH] Powerpc eSDHC: Convert the cmd_timeou_ms to u64 to avoid overflow Haijun Zhang
2012-11-26  8:35 ` [PATCH] Use u64 to calculate the timeout value " Haijun Zhang
2012-11-26  9:09   ` Anton Vorontsov
2012-11-26  9:12 ` [PATCH] Powerpc eSDHC: Convert the cmd_timeou_ms to u64 " Anton Vorontsov
2012-11-26  9:35   ` Zhang Haijun-B42677

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox