mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] mmc: core: Add error message when switching fails in mmc_select_hs()
@ 2016-08-24 10:34 Jungseung Lee
  2016-08-25 10:02 ` Ulf Hansson
  0 siblings, 1 reply; 2+ messages in thread
From: Jungseung Lee @ 2016-08-24 10:34 UTC (permalink / raw)
  To: Ulf Hansson, linux-mmc, linux-kernel; +Cc: Jungseung Lee

The switch failure message in mmc_select_timing() had been removed
since that is invalid: commit 0400ed0a083a ("mmc: core: remove the
invalid message in mmc_select_timing")

Now, in the case when mmc_select_hs() return error in mmc_select_timing(),
there is nothing to print failure message.
Let's make for mmc_select_hs() print message itself in the failure case.

Signed-off-by: Jungseung Lee <js07.lee@samsung.com>
---
 drivers/mmc/core/mmc.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index f2d185c..3486bc7 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -1029,6 +1029,10 @@ static int mmc_select_hs(struct mmc_card *card)
 		err = mmc_switch_status(card);
 	}
 
+	if (err)
+		pr_warn("%s: switch to high-speed failed, err:%d\n",
+			mmc_hostname(card->host), err);
+
 	return err;
 }
 
@@ -1265,11 +1269,8 @@ static int mmc_select_hs400es(struct mmc_card *card)
 
 	/* Switch card to HS mode */
 	err = mmc_select_hs(card);
-	if (err) {
-		pr_err("%s: switch to high-speed failed, err:%d\n",
-			mmc_hostname(host), err);
+	if (err)
 		goto out_err;
-	}
 
 	err = mmc_switch_status(card);
 	if (err)
-- 
1.7.9.5

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

* Re: [PATCH] mmc: core: Add error message when switching fails in mmc_select_hs()
  2016-08-24 10:34 [PATCH] mmc: core: Add error message when switching fails in mmc_select_hs() Jungseung Lee
@ 2016-08-25 10:02 ` Ulf Hansson
  0 siblings, 0 replies; 2+ messages in thread
From: Ulf Hansson @ 2016-08-25 10:02 UTC (permalink / raw)
  To: Jungseung Lee; +Cc: linux-mmc, linux-kernel

On 24 August 2016 at 12:34, Jungseung Lee <js07.lee@samsung.com> wrote:
> The switch failure message in mmc_select_timing() had been removed
> since that is invalid: commit 0400ed0a083a ("mmc: core: remove the
> invalid message in mmc_select_timing")
>
> Now, in the case when mmc_select_hs() return error in mmc_select_timing(),
> there is nothing to print failure message.
> Let's make for mmc_select_hs() print message itself in the failure case.
>
> Signed-off-by: Jungseung Lee <js07.lee@samsung.com>

Thanks, applied for next!

Future wise, please bump the version number and include a history of
what has changed. This helps the reviewers.

Kind regards
Uffe

> ---
>  drivers/mmc/core/mmc.c |    9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
> index f2d185c..3486bc7 100644
> --- a/drivers/mmc/core/mmc.c
> +++ b/drivers/mmc/core/mmc.c
> @@ -1029,6 +1029,10 @@ static int mmc_select_hs(struct mmc_card *card)
>                 err = mmc_switch_status(card);
>         }
>
> +       if (err)
> +               pr_warn("%s: switch to high-speed failed, err:%d\n",
> +                       mmc_hostname(card->host), err);
> +
>         return err;
>  }
>
> @@ -1265,11 +1269,8 @@ static int mmc_select_hs400es(struct mmc_card *card)
>
>         /* Switch card to HS mode */
>         err = mmc_select_hs(card);
> -       if (err) {
> -               pr_err("%s: switch to high-speed failed, err:%d\n",
> -                       mmc_hostname(host), err);
> +       if (err)
>                 goto out_err;
> -       }
>
>         err = mmc_switch_status(card);
>         if (err)
> --
> 1.7.9.5
>

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

end of thread, other threads:[~2016-08-25 10:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-24 10:34 [PATCH] mmc: core: Add error message when switching fails in mmc_select_hs() Jungseung Lee
2016-08-25 10:02 ` Ulf Hansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®