OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b7ac2cf
)
mmc: properly iterate over sg list in debug check
author
Pierre Ossman
<drzeus@drzeus.cx>
Mon, 28 Jul 2008 23:09:37 +0000
(
01:09
+0200)
committer
Pierre Ossman
<drzeus@drzeus.cx>
Fri, 1 Aug 2008 17:03:37 +0000
(19:03 +0200)
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
drivers/mmc/core/core.c
patch
|
blob
|
history
diff --git
a/drivers/mmc/core/core.c
b/drivers/mmc/core/core.c
index
3ee5b8c
..
044d84e
100644
(file)
--- a/
drivers/mmc/core/core.c
+++ b/
drivers/mmc/core/core.c
@@
-121,6
+121,7
@@
mmc_start_request(struct mmc_host *host, struct mmc_request *mrq)
{
#ifdef CONFIG_MMC_DEBUG
unsigned int i, sz;
+ struct scatterlist *sg;
#endif
pr_debug("%s: starting CMD%u arg %08x flags %08x\n",
@@
-156,8
+157,8
@@
mmc_start_request(struct mmc_host *host, struct mmc_request *mrq)
#ifdef CONFIG_MMC_DEBUG
sz = 0;
- for
(i = 0;i < mrq->data->sg_len;i++
)
- sz +=
mrq->data->sg[i].
length;
+ for
_each_sg(mrq->data->sg, sg, mrq->data->sg_len, i
)
+ sz +=
sg->
length;
BUG_ON(sz != mrq->data->blocks * mrq->data->blksz);
#endif