All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ulf Hansson <ulf.hansson@linaro.org>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: linux-mmc <linux-mmc@vger.kernel.org>,
	linux-renesas-soc@vger.kernel.org,
	Dirk Behme <dirk.behme@gmail.com>,
	Kuninori Morimoto <kuninori.morimoto.gx@gmail.com>
Subject: Re: [PATCH] mmc: sanitize 'bus width' in debug output
Date: Tue, 2 Feb 2016 14:11:21 +0100	[thread overview]
Message-ID: <CAPDyKFp9dtUbpzdUw4a-JtJm0y3JdTWLSV=jA4CUc3-9Ct2C0Q@mail.gmail.com> (raw)
In-Reply-To: <1454056070-6164-1-git-send-email-wsa@the-dreams.de>

On 29 January 2016 at 09:27, Wolfram Sang <wsa@the-dreams.de> wrote:
> From: Wolfram Sang <wsa+renesas@sang-engineering.com>
>
> The bus width is sometimes the actual bus width, and sometimes indices
> to different arrays encoding the bus width. In my debugging case "2"
> could mean 8-bit as well as 4-bit, which was extremly confusing. Let's
> use the human-readable actual bus width in all places.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Thanks, applied for next!

Kind regards
Uffe

> ---
>  drivers/mmc/core/core.c | 2 +-
>  drivers/mmc/core/mmc.c  | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
> index f95d41ffc766e5..746de248defced 100644
> --- a/drivers/mmc/core/core.c
> +++ b/drivers/mmc/core/core.c
> @@ -1033,7 +1033,7 @@ static inline void mmc_set_ios(struct mmc_host *host)
>                 "width %u timing %u\n",
>                  mmc_hostname(host), ios->clock, ios->bus_mode,
>                  ios->power_mode, ios->chip_select, ios->vdd,
> -                ios->bus_width, ios->timing);
> +                1 << ios->bus_width, ios->timing);
>
>         host->ops->set_ios(host, ios);
>  }
> diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
> index 07a135bc893057..4dbe3df8024b2c 100644
> --- a/drivers/mmc/core/mmc.c
> +++ b/drivers/mmc/core/mmc.c
> @@ -945,7 +945,7 @@ static int mmc_select_bus_width(struct mmc_card *card)
>                         break;
>                 } else {
>                         pr_warn("%s: switch to bus width %d failed\n",
> -                               mmc_hostname(host), ext_csd_bits[idx]);
> +                               mmc_hostname(host), 1 << bus_width);
>                 }
>         }
>
> --
> 2.6.2
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2016-02-02 13:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-29  8:27 [PATCH] mmc: sanitize 'bus width' in debug output Wolfram Sang
2016-02-02 13:11 ` Ulf Hansson [this message]

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='CAPDyKFp9dtUbpzdUw4a-JtJm0y3JdTWLSV=jA4CUc3-9Ct2C0Q@mail.gmail.com' \
    --to=ulf.hansson@linaro.org \
    --cc=dirk.behme@gmail.com \
    --cc=kuninori.morimoto.gx@gmail.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=wsa@the-dreams.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.