summaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorChris Ball <cjb@laptop.org>2011-02-28 22:45:10 +0100
committerChris Ball <cjb@laptop.org>2011-03-17 20:35:06 +0100
commitba6a902d9d89b976bf64a435ec97a490cd160dec (patch)
treed4e6545b65d877b03a1c431c5eee73f521422600 /drivers/mmc
parentmmc: sdhci-esdhc-imx: add card detect on custom GPIO for mx25/35 (diff)
downloadlinux-ba6a902d9d89b976bf64a435ec97a490cd160dec.tar.xz
linux-ba6a902d9d89b976bf64a435ec97a490cd160dec.zip
mmc: dw_mmc: Remove set-but-unused variable.
count is only ever used by assigning to old_len if count == 0, and then old_len isn't ever used at all. So, both are redundant. Fixes: drivers/mmc/host/dw_mmc.c: In function ‘dw_mci_read_data_pio’: drivers/mmc/host/dw_mmc.c:1034:32: warning: variable ‘old_len’ set but not used [-Wunused-but-set-variable] Signed-off-by: Chris Ball <cjb@laptop.org> Acked-by: Will Newton <will.newton@imgtec.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/dw_mmc.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 58476c1bb056..299c1d61b6b3 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -1031,13 +1031,10 @@ static void dw_mci_read_data_pio(struct dw_mci *host)
struct mmc_data *data = host->data;
int shift = host->data_shift;
u32 status;
- unsigned int nbytes = 0, len, old_len, count = 0;
+ unsigned int nbytes = 0, len;
do {
len = SDMMC_GET_FCNT(mci_readl(host, STATUS)) << shift;
- if (count == 0)
- old_len = len;
-
if (offset + len <= sg->length) {
host->pull_data(host, (void *)(buf + offset), len);
@@ -1082,7 +1079,6 @@ static void dw_mci_read_data_pio(struct dw_mci *host)
tasklet_schedule(&host->tasklet);
return;
}
- count++;
} while (status & SDMMC_INT_RXDR); /*if the RXDR is ready read again*/
len = SDMMC_GET_FCNT(mci_readl(host, STATUS));
host->pio_offset = offset;