linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mmc: sd: use HIGH_SPEED_BUS_SPEED in mmc_sd_switch_hs()
@ 2020-04-10  6:57 Jisheng Zhang
  2020-04-17 11:29 ` Ulf Hansson
  0 siblings, 1 reply; 2+ messages in thread
From: Jisheng Zhang @ 2020-04-10  6:57 UTC (permalink / raw)
  To: Ulf Hansson; +Cc: linux-mmc, linux-kernel

Use the well defined HIGH_SPEED_BUS_SPEED macro in mmc_sd_switch_hs()
to make code more readable.

Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
---
 drivers/mmc/core/sd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c
index 76c7add367d5..43de3190d718 100644
--- a/drivers/mmc/core/sd.c
+++ b/drivers/mmc/core/sd.c
@@ -376,11 +376,11 @@ int mmc_sd_switch_hs(struct mmc_card *card)
 	if (!status)
 		return -ENOMEM;
 
-	err = mmc_sd_switch(card, 1, 0, 1, status);
+	err = mmc_sd_switch(card, 1, 0, HIGH_SPEED_BUS_SPEED, status);
 	if (err)
 		goto out;
 
-	if ((status[16] & 0xF) != 1) {
+	if ((status[16] & 0xF) != HIGH_SPEED_BUS_SPEED) {
 		pr_warn("%s: Problem switching card into high-speed mode!\n",
 			mmc_hostname(card->host));
 		err = 0;
-- 
2.26.0


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

* Re: [PATCH] mmc: sd: use HIGH_SPEED_BUS_SPEED in mmc_sd_switch_hs()
  2020-04-10  6:57 [PATCH] mmc: sd: use HIGH_SPEED_BUS_SPEED in mmc_sd_switch_hs() Jisheng Zhang
@ 2020-04-17 11:29 ` Ulf Hansson
  0 siblings, 0 replies; 2+ messages in thread
From: Ulf Hansson @ 2020-04-17 11:29 UTC (permalink / raw)
  To: Jisheng Zhang; +Cc: linux-mmc, Linux Kernel Mailing List

On Fri, 10 Apr 2020 at 08:57, Jisheng Zhang <Jisheng.Zhang@synaptics.com> wrote:
>
> Use the well defined HIGH_SPEED_BUS_SPEED macro in mmc_sd_switch_hs()
> to make code more readable.
>
> Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>

Applied for next, thanks!

Kind regards
Uffe


> ---
>  drivers/mmc/core/sd.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c
> index 76c7add367d5..43de3190d718 100644
> --- a/drivers/mmc/core/sd.c
> +++ b/drivers/mmc/core/sd.c
> @@ -376,11 +376,11 @@ int mmc_sd_switch_hs(struct mmc_card *card)
>         if (!status)
>                 return -ENOMEM;
>
> -       err = mmc_sd_switch(card, 1, 0, 1, status);
> +       err = mmc_sd_switch(card, 1, 0, HIGH_SPEED_BUS_SPEED, status);
>         if (err)
>                 goto out;
>
> -       if ((status[16] & 0xF) != 1) {
> +       if ((status[16] & 0xF) != HIGH_SPEED_BUS_SPEED) {
>                 pr_warn("%s: Problem switching card into high-speed mode!\n",
>                         mmc_hostname(card->host));
>                 err = 0;
> --
> 2.26.0
>

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

end of thread, other threads:[~2020-04-17 11:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-10  6:57 [PATCH] mmc: sd: use HIGH_SPEED_BUS_SPEED in mmc_sd_switch_hs() Jisheng Zhang
2020-04-17 11:29 ` 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).