mmc: meson-gx: improve meson_mmc_irq_thread

Remove unneeded variable ret and simplify the if block.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Acked-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
Heiner Kallweit 2017-02-07 22:34:41 +01:00 committed by Ulf Hansson
parent 5da8688763
commit 690f90b628
1 changed files with 6 additions and 9 deletions

View File

@ -666,7 +666,6 @@ static irqreturn_t meson_mmc_irq_thread(int irq, void *dev_id)
struct mmc_command *cmd = host->cmd; struct mmc_command *cmd = host->cmd;
struct mmc_data *data; struct mmc_data *data;
unsigned int xfer_bytes; unsigned int xfer_bytes;
int ret = IRQ_HANDLED;
if (WARN_ON(!mrq)) if (WARN_ON(!mrq))
return IRQ_NONE; return IRQ_NONE;
@ -675,15 +674,13 @@ static irqreturn_t meson_mmc_irq_thread(int irq, void *dev_id)
return IRQ_NONE; return IRQ_NONE;
data = cmd->data; data = cmd->data;
if (data) { if (data && data->flags & MMC_DATA_READ) {
xfer_bytes = data->blksz * data->blocks; xfer_bytes = data->blksz * data->blocks;
if (data->flags & MMC_DATA_READ) {
WARN_ON(xfer_bytes > host->bounce_buf_size); WARN_ON(xfer_bytes > host->bounce_buf_size);
sg_copy_from_buffer(data->sg, data->sg_len, sg_copy_from_buffer(data->sg, data->sg_len,
host->bounce_buf, xfer_bytes); host->bounce_buf, xfer_bytes);
data->bytes_xfered = xfer_bytes; data->bytes_xfered = xfer_bytes;
} }
}
meson_mmc_read_resp(host->mmc, cmd); meson_mmc_read_resp(host->mmc, cmd);
if (!data || !data->stop || mrq->sbc) if (!data || !data->stop || mrq->sbc)
@ -691,7 +688,7 @@ static irqreturn_t meson_mmc_irq_thread(int irq, void *dev_id)
else else
meson_mmc_start_cmd(host->mmc, data->stop); meson_mmc_start_cmd(host->mmc, data->stop);
return ret; return IRQ_HANDLED;
} }
/* /*