linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH mmc-next] mmc: sdhci: fix __sdhci_adma_write_desc
@ 2018-09-17  5:30 Jisheng Zhang
  2018-09-17  6:21 ` Adrian Hunter
  2018-09-17 18:35 ` Ulf Hansson
  0 siblings, 2 replies; 3+ messages in thread
From: Jisheng Zhang @ 2018-09-17  5:30 UTC (permalink / raw)
  To: Adrian Hunter, Ulf Hansson; +Cc: linux-mmc, linux-arm-kernel, linux-kernel

If hosts provides ops->adma_write_desc, we should not fall back to the
general sdhci_adma_write_desc().

Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
---

Hi Ulf, Adrian,

When I introduced .adma_write_desc, I made a mistake since v4 -- if the host
provide ops->adma_write_desc, we should just call it and don't fall back
to the general sdhci_adma_write_desc(). Before v4, the adma_write_desc return
int, since v4 there's no return value, so when I prepared the v4, I just
removed return, this is where the mistake is from. I dunno how to handle
this case, fold the patch into previous commit or apply it as a separate patch?

I'm very sorry for this. In fact, Adrian caught another similar bug during
review.

Sorry about the inconvenience,
Jisheng

 drivers/mmc/host/sdhci.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 0dda6f4b6a24..99bdae53fa2e 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -649,8 +649,8 @@ static inline void __sdhci_adma_write_desc(struct sdhci_host *host,
 {
 	if (host->ops->adma_write_desc)
 		host->ops->adma_write_desc(host, desc, addr, len, cmd);
-
-	sdhci_adma_write_desc(host, desc, addr, len, cmd);
+	else
+		sdhci_adma_write_desc(host, desc, addr, len, cmd);
 }
 
 static void sdhci_adma_mark_end(void *desc)
-- 
2.19.0


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

* Re: [PATCH mmc-next] mmc: sdhci: fix __sdhci_adma_write_desc
  2018-09-17  5:30 [PATCH mmc-next] mmc: sdhci: fix __sdhci_adma_write_desc Jisheng Zhang
@ 2018-09-17  6:21 ` Adrian Hunter
  2018-09-17 18:35 ` Ulf Hansson
  1 sibling, 0 replies; 3+ messages in thread
From: Adrian Hunter @ 2018-09-17  6:21 UTC (permalink / raw)
  To: Jisheng Zhang, Ulf Hansson; +Cc: linux-mmc, linux-arm-kernel, linux-kernel

On 17/09/18 08:30, Jisheng Zhang wrote:
> If hosts provides ops->adma_write_desc, we should not fall back to the
> general sdhci_adma_write_desc().
> 
> Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
> ---
> 
> Hi Ulf, Adrian,
> 
> When I introduced .adma_write_desc, I made a mistake since v4 -- if the host
> provide ops->adma_write_desc, we should just call it and don't fall back
> to the general sdhci_adma_write_desc(). Before v4, the adma_write_desc return
> int, since v4 there's no return value, so when I prepared the v4, I just
> removed return, this is where the mistake is from. I dunno how to handle
> this case, fold the patch into previous commit or apply it as a separate patch?

Up to Ulf, but in any case:

Acked-by: Adrian Hunter <adrian.hunter@intel.com>

> 
> I'm very sorry for this. In fact, Adrian caught another similar bug during
> review.
> 
> Sorry about the inconvenience,
> Jisheng
> 
>  drivers/mmc/host/sdhci.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index 0dda6f4b6a24..99bdae53fa2e 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -649,8 +649,8 @@ static inline void __sdhci_adma_write_desc(struct sdhci_host *host,
>  {
>  	if (host->ops->adma_write_desc)
>  		host->ops->adma_write_desc(host, desc, addr, len, cmd);
> -
> -	sdhci_adma_write_desc(host, desc, addr, len, cmd);
> +	else
> +		sdhci_adma_write_desc(host, desc, addr, len, cmd);
>  }
>  
>  static void sdhci_adma_mark_end(void *desc)
> 


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

* Re: [PATCH mmc-next] mmc: sdhci: fix __sdhci_adma_write_desc
  2018-09-17  5:30 [PATCH mmc-next] mmc: sdhci: fix __sdhci_adma_write_desc Jisheng Zhang
  2018-09-17  6:21 ` Adrian Hunter
@ 2018-09-17 18:35 ` Ulf Hansson
  1 sibling, 0 replies; 3+ messages in thread
From: Ulf Hansson @ 2018-09-17 18:35 UTC (permalink / raw)
  To: Jisheng Zhang
  Cc: Adrian Hunter, linux-mmc, Linux ARM, Linux Kernel Mailing List

On 17 September 2018 at 07:30, Jisheng Zhang
<Jisheng.Zhang@synaptics.com> wrote:
> If hosts provides ops->adma_write_desc, we should not fall back to the
> general sdhci_adma_write_desc().
>
> Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
> ---
>
> Hi Ulf, Adrian,
>
> When I introduced .adma_write_desc, I made a mistake since v4 -- if the host
> provide ops->adma_write_desc, we should just call it and don't fall back
> to the general sdhci_adma_write_desc(). Before v4, the adma_write_desc return
> int, since v4 there's no return value, so when I prepared the v4, I just
> removed return, this is where the mistake is from. I dunno how to handle
> this case, fold the patch into previous commit or apply it as a separate patch?
>
> I'm very sorry for this. In fact, Adrian caught another similar bug during
> review.
>
> Sorry about the inconvenience,
> Jisheng

No worries, mistakes happens - the important thing is that we fix them!

Thanks for providing the information above.

I have applied this as is for next.

Kind regards
Uffe

>
>  drivers/mmc/host/sdhci.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index 0dda6f4b6a24..99bdae53fa2e 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -649,8 +649,8 @@ static inline void __sdhci_adma_write_desc(struct sdhci_host *host,
>  {
>         if (host->ops->adma_write_desc)
>                 host->ops->adma_write_desc(host, desc, addr, len, cmd);
> -
> -       sdhci_adma_write_desc(host, desc, addr, len, cmd);
> +       else
> +               sdhci_adma_write_desc(host, desc, addr, len, cmd);
>  }
>
>  static void sdhci_adma_mark_end(void *desc)
> --
> 2.19.0
>

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

end of thread, other threads:[~2018-09-17 18:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-17  5:30 [PATCH mmc-next] mmc: sdhci: fix __sdhci_adma_write_desc Jisheng Zhang
2018-09-17  6:21 ` Adrian Hunter
2018-09-17 18:35 ` Ulf Hansson

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).