mmc: davinci: Fix -Wpointer-to-int-cast on compile test
authorKrzysztof Kozlowski <krzk@kernel.org>
Wed, 2 Sep 2020 20:48:45 +0000 (22:48 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 7 Sep 2020 07:16:31 +0000 (09:16 +0200)
Store in interrupt service routine always '1' in end_command, not the
value of host->cmd to fix compile test warnings on RISC-V:

  drivers/mmc/host/davinci_mmc.c:999:17: warning:
    cast from pointer to integer of different size [-Wpointer-to-int-cast]

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20200902204847.2764-1-krzk@kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/davinci_mmc.c

index fad1010..66d740e 100644 (file)
@@ -996,7 +996,7 @@ static irqreturn_t mmc_davinci_irq(int irq, void *dev_id)
 
        if (qstatus & MMCST0_RSPDNE) {
                /* End of command phase */
-               end_command = (int) host->cmd;
+               end_command = host->cmd ? 1 : 0;
        }
 
        if (end_command)