Hi Michal, > -----Original Message----- > From: Michal Simek <michal.si...@xilinx.com> > Sent: Friday, July 9, 2021 4:35 PM > To: Ashok Reddy Soma <ashok...@xilinx.com>; u-boot@lists.denx.de > Cc: peng....@nxp.com; jh80.ch...@samsung.com; git <g...@xilinx.com>; > mon...@monstr.eu; somaashokre...@gmail.com > Subject: Re: [PATCH v2 1/6] mmc: zynq_sdhci: Resolve uninitialized return > value > > > > On 7/9/21 12:46 PM, Ashok Reddy Soma wrote: > > 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.s...@xilinx.com> > > --- > > > > Changes in v2: > > - Changed "@degree" to "@degrees:" in function descriptions of tap > > delay functions > > > > drivers/mmc/zynq_sdhci.c | 24 ++++++++++-------------- > > 1 file changed, 10 insertions(+), 14 deletions(-) > > > > diff --git a/drivers/mmc/zynq_sdhci.c b/drivers/mmc/zynq_sdhci.c index > > b79c4021b6..03600188ba 100644 > > --- a/drivers/mmc/zynq_sdhci.c > > +++ b/drivers/mmc/zynq_sdhci.c > > @@ -183,7 +183,7 @@ static int arasan_sdhci_execute_tuning(struct mmc > *mmc, u8 opcode) > > * > > * @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_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; > > } > > > > /** > > @@ -239,7 +238,7 @@ static int sdhci_zynqmp_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_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; > > } > > > > /** > > @@ -294,15 +292,14 @@ static int > sdhci_zynqmp_sampleclk_set_phase(struct sdhci_host *host, > > * 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. > > this should be also the part of 5/6 Sure will move it to 5/6. > > > + * 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; > > } > > > > /** > > @@ -358,15 +355,14 @@ static int sdhci_versal_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. > > this should be also the part of 5/6 will move it to 5/6 here too.
Thanks, Ashok > > > + * 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) > > > > M