linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mmc: renesas_sdhi: simplify execute_tuning
@ 2020-02-13 16:37 Wolfram Sang
  2020-02-13 16:50 ` Niklas Söderlund
  0 siblings, 1 reply; 2+ messages in thread
From: Wolfram Sang @ 2020-02-13 16:37 UTC (permalink / raw)
  To: linux-mmc; +Cc: Niklas Söderlund, linux-renesas-soc, Wolfram Sang

After refactoring, 'ret' variable is superfluous. Remove it.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---

Tested on a Salvator-XS (R-Car M3-N). Tuning to HS400 works,
checksumming a large file works with no performance regression.

 drivers/mmc/host/renesas_sdhi_core.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
index 0f07cc1aee34..df826661366f 100644
--- a/drivers/mmc/host/renesas_sdhi_core.c
+++ b/drivers/mmc/host/renesas_sdhi_core.c
@@ -497,7 +497,7 @@ static int renesas_sdhi_select_tuning(struct tmio_mmc_host *host)
 static int renesas_sdhi_execute_tuning(struct tmio_mmc_host *host, u32 opcode)
 {
 	struct renesas_sdhi *priv = host_to_priv(host);
-	int i, ret;
+	int i;
 
 	priv->tap_num = renesas_sdhi_init_tuning(host);
 	if (!priv->tap_num)
@@ -517,8 +517,7 @@ static int renesas_sdhi_execute_tuning(struct tmio_mmc_host *host, u32 opcode)
 		/* Set sampling clock position */
 		sd_scc_write32(host, priv, SH_MOBILE_SDHI_SCC_TAPSET, i % priv->tap_num);
 
-		ret = mmc_send_tuning(host->mmc, opcode, NULL);
-		if (ret == 0)
+		if (mmc_send_tuning(host->mmc, opcode, NULL) == 0)
 			set_bit(i, priv->taps);
 	}
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mmc: renesas_sdhi: simplify execute_tuning
  2020-02-13 16:37 [PATCH] mmc: renesas_sdhi: simplify execute_tuning Wolfram Sang
@ 2020-02-13 16:50 ` Niklas Söderlund
  0 siblings, 0 replies; 2+ messages in thread
From: Niklas Söderlund @ 2020-02-13 16:50 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-mmc, linux-renesas-soc

Hi Wolfram,

Thanks for your work.

On 2020-02-13 17:37:15 +0100, Wolfram Sang wrote:
> After refactoring, 'ret' variable is superfluous. Remove it.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

> ---
> 
> Tested on a Salvator-XS (R-Car M3-N). Tuning to HS400 works,
> checksumming a large file works with no performance regression.
> 
>  drivers/mmc/host/renesas_sdhi_core.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
> index 0f07cc1aee34..df826661366f 100644
> --- a/drivers/mmc/host/renesas_sdhi_core.c
> +++ b/drivers/mmc/host/renesas_sdhi_core.c
> @@ -497,7 +497,7 @@ static int renesas_sdhi_select_tuning(struct tmio_mmc_host *host)
>  static int renesas_sdhi_execute_tuning(struct tmio_mmc_host *host, u32 opcode)
>  {
>  	struct renesas_sdhi *priv = host_to_priv(host);
> -	int i, ret;
> +	int i;
>  
>  	priv->tap_num = renesas_sdhi_init_tuning(host);
>  	if (!priv->tap_num)
> @@ -517,8 +517,7 @@ static int renesas_sdhi_execute_tuning(struct tmio_mmc_host *host, u32 opcode)
>  		/* Set sampling clock position */
>  		sd_scc_write32(host, priv, SH_MOBILE_SDHI_SCC_TAPSET, i % priv->tap_num);
>  
> -		ret = mmc_send_tuning(host->mmc, opcode, NULL);
> -		if (ret == 0)
> +		if (mmc_send_tuning(host->mmc, opcode, NULL) == 0)
>  			set_bit(i, priv->taps);
>  	}
>  
> -- 
> 2.20.1
> 

-- 
Regards,
Niklas Söderlund

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-02-13 16:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-13 16:37 [PATCH] mmc: renesas_sdhi: simplify execute_tuning Wolfram Sang
2020-02-13 16:50 ` Niklas Söderlund

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).