mmc: block: Replace "goto retry" by a proper do / while loop

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
Geert Uytterhoeven 2016-12-19 15:03:45 +01:00 committed by Ulf Hansson
parent 8cb6ed17eb
commit 164b50b353
1 changed files with 13 additions and 15 deletions

View File

@ -1164,21 +1164,19 @@ static int mmc_blk_issue_discard_rq(struct mmc_queue *mq, struct request *req)
arg = MMC_TRIM_ARG; arg = MMC_TRIM_ARG;
else else
arg = MMC_ERASE_ARG; arg = MMC_ERASE_ARG;
retry: do {
if (card->quirks & MMC_QUIRK_INAND_CMD38) { err = 0;
err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL, if (card->quirks & MMC_QUIRK_INAND_CMD38) {
INAND_CMD38_ARG_EXT_CSD, err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
arg == MMC_TRIM_ARG ? INAND_CMD38_ARG_EXT_CSD,
INAND_CMD38_ARG_TRIM : arg == MMC_TRIM_ARG ?
INAND_CMD38_ARG_ERASE, INAND_CMD38_ARG_TRIM :
0); INAND_CMD38_ARG_ERASE,
if (err) 0);
goto out; }
} if (!err)
err = mmc_erase(card, from, nr, arg); err = mmc_erase(card, from, nr, arg);
out: } while (err == -EIO && !mmc_blk_reset(md, card->host, type));
if (err == -EIO && !mmc_blk_reset(md, card->host, type))
goto retry;
if (!err) if (!err)
mmc_blk_reset_success(md, type); mmc_blk_reset_success(md, type);
fail: fail: