Skip to content

Commit

Permalink
mmc: dw_mmc: Remove set-but-unused variable.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Will Newton <[email protected]>
  • Loading branch information
cjb committed Mar 17, 2011
1 parent 7e29c30 commit ba6a902
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions drivers/mmc/host/dw_mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit ba6a902

Please sign in to comment.