mmc: zynq: Fix tuning_loop_counter type in arasan_sdhci_execute_tuning()
authorMichal Simek <michal.simek@xilinx.com>
Wed, 13 Jun 2018 07:12:29 +0000 (09:12 +0200)
committerMichal Simek <michal.simek@xilinx.com>
Fri, 15 Jun 2018 06:54:04 +0000 (08:54 +0200)
Code around tuning_loop_counter variable expects to go below zero.
That's why this variable can't use unsigned type.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/mmc/zynq_sdhci.c

index 5b6d5256084c8dfad68e680bc6b6548c9dbe62f5..b05334dfc8d42efcf7ef1663b99381995eaf2137 100644 (file)
@@ -92,7 +92,7 @@ static int arasan_sdhci_execute_tuning(struct mmc *mmc, u8 opcode)
        u32 ctrl;
        struct sdhci_host *host;
        struct arasan_sdhci_priv *priv = dev_get_priv(mmc->dev);
-       u8 tuning_loop_counter = SDHCI_TUNING_LOOP_COUNT;
+       char tuning_loop_counter = SDHCI_TUNING_LOOP_COUNT;
        u8 deviceid;
 
        debug("%s\n", __func__);