]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
mmc: zynq_sdhci: Resolve uninitialized return value
authorAshok Reddy Soma <ashok.reddy.soma@xilinx.com>
Mon, 30 Nov 2020 15:08:42 +0000 (08:08 -0700)
committerMichal Simek <michal.simek@xilinx.com>
Tue, 2 Feb 2021 12:49:32 +0000 (13:49 +0100)
set_phase() functions are not modifying the ret value and returning
the same uninitialized ret, return 0 instead.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
State: pending

drivers/mmc/zynq_sdhci.c

index 147ecc0d708d31fcded9f74c3024158a6d9a725a..193c3c74288388c9e4a5e3c466da2df5b18425af 100644 (file)
@@ -182,8 +182,8 @@ static int arasan_sdhci_execute_tuning(struct mmc *mmc, u8 opcode)
  * Set the SD Output Clock Tap Delays for Output path
  *
  * @host:              Pointer to the sdhci_host structure.
- * @degrees:           The clock phase shift between 0 - 359.
- * Return: 0 on success and error value on error
+ * @degrees            The clock phase shift between 0 - 359.
+ * Return: 0
  */
 static int sdhci_zynqmp_sdcardclk_set_phase(struct sdhci_host *host,
                                            int degrees)
@@ -191,7 +191,6 @@ static int sdhci_zynqmp_sdcardclk_set_phase(struct sdhci_host *host,
        struct arasan_sdhci_priv *priv = dev_get_priv(host->mmc->dev);
        struct mmc *mmc = (struct mmc *)host->mmc;
        u8 tap_delay, tap_max = 0;
-       int ret;
        int timing = mode2timing[mmc->selected_mode];
 
        /*
@@ -229,7 +228,7 @@ static int sdhci_zynqmp_sdcardclk_set_phase(struct sdhci_host *host,
 
        arasan_zynqmp_set_tapdelay(priv->deviceid, 0, tap_delay);
 
-       return ret;
+       return 0;
 }
 
 /**
@@ -238,8 +237,8 @@ static int sdhci_zynqmp_sdcardclk_set_phase(struct sdhci_host *host,
  * Set the SD Input Clock Tap Delays for Input path
  *
  * @host:              Pointer to the sdhci_host structure.
- * @degrees:           The clock phase shift between 0 - 359.
- * Return: 0 on success and error value on error
+ * @degrees            The clock phase shift between 0 - 359.
+ * Return: 0
  */
 static int sdhci_zynqmp_sampleclk_set_phase(struct sdhci_host *host,
                                            int degrees)
@@ -247,7 +246,6 @@ static int sdhci_zynqmp_sampleclk_set_phase(struct sdhci_host *host,
        struct arasan_sdhci_priv *priv = dev_get_priv(host->mmc->dev);
        struct mmc *mmc = (struct mmc *)host->mmc;
        u8 tap_delay, tap_max = 0;
-       int ret;
        int timing = mode2timing[mmc->selected_mode];
 
        /*
@@ -285,7 +283,7 @@ static int sdhci_zynqmp_sampleclk_set_phase(struct sdhci_host *host,
 
        arasan_zynqmp_set_tapdelay(priv->deviceid, tap_delay, 0);
 
-       return ret;
+       return 0;
 }
 
 /**
@@ -295,14 +293,13 @@ static int sdhci_zynqmp_sampleclk_set_phase(struct sdhci_host *host,
  *
  * @host:              Pointer to the sdhci_host structure.
  * @degrees            The clock phase shift between 0 - 359.
- * Return: 0 on success and error value on error
+ * Return: 0
  */
 static int sdhci_versal_sdcardclk_set_phase(struct sdhci_host *host,
                                            int degrees)
 {
        struct mmc *mmc = (struct mmc *)host->mmc;
        u8 tap_delay, tap_max = 0;
-       int ret;
        int timing = mode2timing[mmc->selected_mode];
 
        /*
@@ -349,7 +346,7 @@ static int sdhci_versal_sdcardclk_set_phase(struct sdhci_host *host,
                sdhci_writel(host, regval, SDHCI_ARASAN_OTAPDLY_REGISTER);
        }
 
-       return ret;
+       return 0;
 }
 
 /**
@@ -359,14 +356,13 @@ static int sdhci_versal_sdcardclk_set_phase(struct sdhci_host *host,
  *
  * @host:              Pointer to the sdhci_host structure.
  * @degrees            The clock phase shift between 0 - 359.
- * Return: 0 on success and error value on error
+ * Return: 0
  */
 static int sdhci_versal_sampleclk_set_phase(struct sdhci_host *host,
                                            int degrees)
 {
        struct mmc *mmc = (struct mmc *)host->mmc;
        u8 tap_delay, tap_max = 0;
-       int ret;
        int timing = mode2timing[mmc->selected_mode];
 
        /*
@@ -417,7 +413,7 @@ static int sdhci_versal_sampleclk_set_phase(struct sdhci_host *host,
                sdhci_writel(host, regval, SDHCI_ARASAN_ITAPDLY_REGISTER);
        }
 
-       return ret;
+       return 0;
 }
 
 static void arasan_sdhci_set_tapdelay(struct sdhci_host *host)