From: Chris Ball <cjb@laptop.org>
To: Stephen Boyd <sboyd@codeaurora.org>
Cc: Subhash Jadavani <subhashj@codeaurora.org>,
linux-mmc@vger.kernel.org, linux-arm-msm@vger.kernel.org,
arindam.nath@amd.com
Subject: Re: [PATCH v1 1/1] mmc: bus: print bus speed mode of UHS-I card
Date: Sat, 31 Mar 2012 23:55:03 -0400 [thread overview]
Message-ID: <87aa2wm7hk.fsf@laptop.org> (raw)
In-Reply-To: <4F700BE5.2050101@codeaurora.org> (Stephen Boyd's message of "Sun, 25 Mar 2012 23:25:41 -0700")
Hi Subhash,
On Mon, Mar 26 2012, Stephen Boyd wrote:
> On 3/22/2012 10:56 PM, Subhash Jadavani wrote:
>> @@ -296,6 +297,28 @@ int mmc_add_card(struct mmc_card *card)
>> break;
>> }
>>
>> + if (mmc_sd_card_uhs(card)) {
>> + switch (card->sd_bus_speed) {
>> + case UHS_SDR104_BUS_SPEED:
>> + uhs_bus_speed_mode = "SDR104 ";
>> + break;
>> + case UHS_SDR50_BUS_SPEED:
>> + uhs_bus_speed_mode = "SDR50 ";
>> + break;
>> + case UHS_DDR50_BUS_SPEED:
>> + uhs_bus_speed_mode = "DDR50 ";
>> + break;
>> + case UHS_SDR25_BUS_SPEED:
>> + uhs_bus_speed_mode = "SDR25 ";
>> + break;
>> + case UHS_SDR12_BUS_SPEED:
>> + uhs_bus_speed_mode = "SDR12 ";
>> + break;
>> + default:
>> + uhs_bus_speed_mode = "";
>> + break;
>> + }
>>
>
> This could be better code with an array:
>
> static char *speeds[] = {
> [UHS_SDR104_BUS_SPEED] = "SDR104",
> [UHS_SDR50_BUS_SPEED] = "SDR50",
> [UHS_SDR50_BUS_SPEED] = "DDR50",
> ...
> };
I'm happy to take the patch in general (I agree that having bus speed in
dmesg is very useful for analyzing bug reports), but let's use Stephen's
suggestion above. Please resend.
Thanks!
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
prev parent reply other threads:[~2012-04-01 3:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-23 5:56 [PATCH v1 1/1] mmc: bus: print bus speed mode of UHS-I card Subhash Jadavani
2012-03-26 3:17 ` Aaron Lu
2012-03-26 6:16 ` Subhash Jadavani
2012-03-26 6:30 ` Subhash Jadavani
2012-03-28 1:09 ` Aaron Lu
2012-03-26 6:25 ` Stephen Boyd
2012-04-01 3:55 ` Chris Ball [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=87aa2wm7hk.fsf@laptop.org \
--to=cjb@laptop.org \
--cc=arindam.nath@amd.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=sboyd@codeaurora.org \
--cc=subhashj@codeaurora.org \
/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.