1 From b98e7e8daf0ebab9dcc36812378a71e1be0b5089 Mon Sep 17 00:00:00 2001
2 From: ChanWoo Lee <cw9316.lee@samsung.com>
3 Date: Thu, 24 Nov 2022 17:00:31 +0900
4 Subject: [PATCH 4/6] mmc: Avoid open coding by using mmc_op_tuning()
6 Replace code with the already defined function. No functional changes.
8 Signed-off-by: ChanWoo Lee <cw9316.lee@samsung.com>
9 Reviewed-by: Adrian Hunter <adrian.hunter@intel.com>
10 Link: https://lore.kernel.org/r/20221124080031.14690-1-cw9316.lee@samsung.com
11 Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
13 drivers/mmc/host/mtk-sd.c | 8 ++------
14 1 file changed, 2 insertions(+), 6 deletions(-)
16 --- a/drivers/mmc/host/mtk-sd.c
17 +++ b/drivers/mmc/host/mtk-sd.c
18 @@ -1224,9 +1224,7 @@ static bool msdc_cmd_done(struct msdc_ho
20 if (!sbc_error && !(events & MSDC_INT_CMDRDY)) {
21 if (events & MSDC_INT_CMDTMO ||
22 - (cmd->opcode != MMC_SEND_TUNING_BLOCK &&
23 - cmd->opcode != MMC_SEND_TUNING_BLOCK_HS200 &&
24 - !host->hs400_tuning))
25 + (!mmc_op_tuning(cmd->opcode) && !host->hs400_tuning))
27 * should not clear fifo/interrupt as the tune data
28 * may have already come when cmd19/cmd21 gets response
29 @@ -1320,9 +1318,7 @@ static void msdc_cmd_next(struct msdc_ho
32 !(cmd->error == -EILSEQ &&
33 - (cmd->opcode == MMC_SEND_TUNING_BLOCK ||
34 - cmd->opcode == MMC_SEND_TUNING_BLOCK_HS200 ||
35 - host->hs400_tuning))) ||
36 + (mmc_op_tuning(cmd->opcode) || host->hs400_tuning))) ||
37 (mrq->sbc && mrq->sbc->error))
38 msdc_request_done(host, mrq);
39 else if (cmd == mrq->sbc)