All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ashok Reddy Soma <ashokred@xilinx.com>
To: Jaehoon Chung <jh80.chung@samsung.com>,
	"u-boot@lists.denx.de" <u-boot@lists.denx.de>
Cc: "peng.fan@nxp.com" <peng.fan@nxp.com>, git <git@xilinx.com>,
	"monstr@monstr.eu" <monstr@monstr.eu>,
	"somaashokreddy@gmail.com" <somaashokreddy@gmail.com>
Subject: RE: [PATCH 1/6] mmc: zynq_sdhci: Resolve uninitialized return value
Date: Fri, 9 Jul 2021 10:57:17 +0000	[thread overview]
Message-ID: <BY5PR02MB6913526B47819D5D1DAEFD9EBA189@BY5PR02MB6913.namprd02.prod.outlook.com> (raw)
In-Reply-To: <086630ce-db3c-8064-43b1-97fc6f31457d@samsung.com>

Hi Jaehoon,

> -----Original Message-----
> From: Jaehoon Chung <jh80.chung@samsung.com>
> Sent: Friday, July 9, 2021 4:21 PM
> To: Ashok Reddy Soma <ashokred@xilinx.com>; u-boot@lists.denx.de
> Cc: peng.fan@nxp.com; git <git@xilinx.com>; monstr@monstr.eu;
> somaashokreddy@gmail.com
> Subject: Re: [PATCH 1/6] mmc: zynq_sdhci: Resolve uninitialized return value
> 
> Hi Ashok,
> 
> On 7/9/21 7:15 PM, Ashok Reddy Soma wrote:
> > Hi Jaehoon,
> >
> >> -----Original Message-----
> >> From: Jaehoon Chung <jh80.chung@samsung.com>
> >> Sent: Friday, July 9, 2021 3:08 PM
> >> To: Ashok Reddy Soma <ashokred@xilinx.com>; u-boot@lists.denx.de
> >> Cc: peng.fan@nxp.com; git <git@xilinx.com>; monstr@monstr.eu;
> >> somaashokreddy@gmail.com
> >> Subject: Re: [PATCH 1/6] mmc: zynq_sdhci: Resolve uninitialized
> >> return value
> >>
> >> Hi Ashok,
> >>
> >> On 7/9/21 4:17 PM, Ashok Reddy Soma wrote:
> >>> set_phase() functions are not modifying the ret value and returning
> >>> the same uninitialized ret, return 0 instead.
> >>
> >> Why didn't you change from int to void?
> >>
> >
> > We are planning to change the way tapdelay's are set to use firmware
> function xilinx_pm_request() in place of arasan_zynqmp_set_out_tapdelay().
> > This return type int is a provision for that.
> 
> Thanks for kindly explanation.
> 
> Could you add the brief comment about that in commit-msg? Then It will be
> clarified more than now.
> Because there is no mentioned why keep to int type.
> Other things look good to me.
> 
Thanks for the review !! 
I will update it in the commit message and send v3.

Thanks,
Ashok

> Best Regards,
> Jaehoon Chung
> 
> >
> > Thanks,
> > Ashok
> >
> >> Best Regards,
> >> Jaehoon Chung
> >>
> >>
> >>>
> >>> Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
> >>> ---
> >>>
> >>>  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..cb785fd735 100644
> >>> --- a/drivers/mmc/zynq_sdhci.c
> >>> +++ b/drivers/mmc/zynq_sdhci.c
> >>> @@ -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)
> >>>
> >


  reply	other threads:[~2021-07-09 10:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-09  7:17 [PATCH 0/6] This patch set fixes minor issues related to tapdelays Ashok Reddy Soma
2021-07-09  7:17 ` [PATCH 1/6] mmc: zynq_sdhci: Resolve uninitialized return value Ashok Reddy Soma
2021-07-09  9:37   ` Jaehoon Chung
2021-07-09 10:15     ` Ashok Reddy Soma
2021-07-09 10:50       ` Jaehoon Chung
2021-07-09 10:57         ` Ashok Reddy Soma [this message]
2021-07-09  7:17 ` [PATCH 2/6] mmc: zynq_sdhci: Allow configuring zero Tap values Ashok Reddy Soma
2021-07-09  7:17 ` [PATCH 3/6] mmc: zynq_sdhci: Use Mask writes for Tap delays Ashok Reddy Soma
2021-07-09  7:17 ` [PATCH 4/6] mmc: zynq_sdhci: Split set_tapdelay function to in and out Ashok Reddy Soma
2021-07-09  7:17 ` [PATCH 5/6] mmc: zynq_sdhci: Fix kernel doc warnings Ashok Reddy Soma
2021-07-09  9:42   ` Jaehoon Chung
2021-07-09 10:18     ` Ashok Reddy Soma
2021-07-09  7:17 ` [PATCH 6/6] mmc: zynq_sdhci: Make variables/structure static Ashok Reddy Soma

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BY5PR02MB6913526B47819D5D1DAEFD9EBA189@BY5PR02MB6913.namprd02.prod.outlook.com \
    --to=ashokred@xilinx.com \
    --cc=git@xilinx.com \
    --cc=jh80.chung@samsung.com \
    --cc=monstr@monstr.eu \
    --cc=peng.fan@nxp.com \
    --cc=somaashokreddy@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.