Commit f98e0d5a authored by Shawn Lin's avatar Shawn Lin Committed by Ulf Hansson

mmc: atmel-mci: remove unused sg_len variable

We got a warning:

drivers/mmc/host/atmel-mci.c:1086:15: warning: variable 'sg_len' set but
not used [-Wunused-but-set-variable]

Ideally we should check to see if sg_len is zero but looking
into the code closely, I didn't find any possible to do that as
atmci_start_request didn't even deploy any error handling for
its host->prepare_data hook. So even we return error value for iflags
like what other host drivers did, for instance, sdhci and dwmmc, it still
need some extra work to improve the code.

Just remove it to silent the warning, although it isn't perfect.
Signed-off-by: default avatarShawn Lin <shawn.lin@rock-chips.com>
Acked-by: default avatarLudovic Desroches <ludovic.desroches@microchip.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent a3a56aee
...@@ -1083,7 +1083,6 @@ static u32 ...@@ -1083,7 +1083,6 @@ static u32
atmci_prepare_data_pdc(struct atmel_mci *host, struct mmc_data *data) atmci_prepare_data_pdc(struct atmel_mci *host, struct mmc_data *data)
{ {
u32 iflags, tmp; u32 iflags, tmp;
unsigned int sg_len;
int i; int i;
data->error = -EINPROGRESS; data->error = -EINPROGRESS;
...@@ -1108,8 +1107,8 @@ atmci_prepare_data_pdc(struct atmel_mci *host, struct mmc_data *data) ...@@ -1108,8 +1107,8 @@ atmci_prepare_data_pdc(struct atmel_mci *host, struct mmc_data *data)
/* Configure PDC */ /* Configure PDC */
host->data_size = data->blocks * data->blksz; host->data_size = data->blocks * data->blksz;
sg_len = dma_map_sg(&host->pdev->dev, data->sg, data->sg_len, dma_map_sg(&host->pdev->dev, data->sg, data->sg_len,
mmc_get_dma_dir(data)); mmc_get_dma_dir(data));
if ((!host->caps.has_rwproof) if ((!host->caps.has_rwproof)
&& (host->data->flags & MMC_DATA_WRITE)) { && (host->data->flags & MMC_DATA_WRITE)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment