From: Sascha Hauer <s.hauer@pengutronix.de>
To: Daniel Mack <daniel@caiaq.de>
Cc: linux-arm-kernel@lists.infradead.org, linux-mmc@vger.kernel.org,
Dan Williams <dan.j.williams@intel.com>,
Volker Ernst <volker.ernst@txtr.com>,
Jiri Kosina <jkosina@suse.cz>
Subject: Re: [PATCH 1/3] ARM: MXC: mxcmmc: misc cleanups
Date: Wed, 31 Mar 2010 14:38:56 +0200 [thread overview]
Message-ID: <20100331123856.GW2241@pengutronix.de> (raw)
In-Reply-To: <1269973921-29611-1-git-send-email-daniel@caiaq.de>
Hi Daniel,
On Tue, Mar 30, 2010 at 08:31:59PM +0200, Daniel Mack wrote:
> Add some more debug information and fix a couple of coding style things
> in mxcmmc.c.
>
> Signed-off-by: Daniel Mack <daniel@caiaq.de>
> Cc: Sascha Hauer <s.hauer@pengutronix.de>
> Cc: Dan Williams <dan.j.williams@intel.com>
> Cc: Volker Ernst <volker.ernst@txtr.com>
> Cc: Jiri Kosina <jkosina@suse.cz>
> ---
> drivers/mmc/host/mxcmmc.c | 28 +++++++++++++++++-----------
> 1 files changed, 17 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c
> index 2df9041..21037ff 100644
> --- a/drivers/mmc/host/mxcmmc.c
> +++ b/drivers/mmc/host/mxcmmc.c
> @@ -151,6 +151,8 @@ static void mxcmci_softreset(struct mxcmci_host *host)
> {
> int i;
>
> + dev_dbg(mmc_dev(host->mmc), "mxcmci_softreset\n");
> +
> /* reset sequence */
> writew(STR_STP_CLK_RESET, host->base + MMC_REG_STR_STP_CLK);
> writew(STR_STP_CLK_RESET | STR_STP_CLK_START_CLK,
> @@ -290,21 +292,29 @@ static int mxcmci_finish_data(struct mxcmci_host *host, unsigned int stat)
> dev_dbg(mmc_dev(host->mmc), "request failed. status: 0x%08x\n",
> stat);
> if (stat & STATUS_CRC_READ_ERR) {
> + dev_err(mmc_dev(host->mmc), "%s: -EILSEQ\n", __func__);
> data->error = -EILSEQ;
> } else if (stat & STATUS_CRC_WRITE_ERR) {
> u32 err_code = (stat >> 9) & 0x3;
> - if (err_code == 2) /* No CRC response */
> + if (err_code == 2) { /* No CRC response */
> + dev_err(mmc_dev(host->mmc),
> + "%s: No CRC -ETIMEDOUT\n", __func__);
> data->error = -ETIMEDOUT;
> - else
> + } else {
> + dev_err(mmc_dev(host->mmc),
> + "%s: -EILSEQ\n", __func__);
> data->error = -EILSEQ;
> + }
> } else if (stat & STATUS_TIME_OUT_READ) {
> + dev_err(mmc_dev(host->mmc),
> + "%s: read -ETIMEDOUT\n", __func__);
> data->error = -ETIMEDOUT;
> } else {
> + dev_err(mmc_dev(host->mmc), "%s: -EIO\n", __func__);
Do we really want to have these messages with dev_err? In the subject
you are talking about debug output.
> data->error = -EIO;
> }
> - } else {
> + } else
> data->bytes_xfered = host->datasize;
> - }
Documentation/CodingStyle says that if braces are used in one branch of
a conditional then they should be used in both branches.
I personally don't care much about this statement but I think we should
leave it as is. Otherwise some day someone wants to change it back
according to the coding style.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2010-03-31 12:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-30 18:31 [PATCH 1/3] ARM: MXC: mxcmmc: misc cleanups Daniel Mack
2010-03-30 18:32 ` [PATCH 2/3] ARM: MXC: mxcmmc: Teach the driver SDIO operations Daniel Mack
2010-03-31 13:03 ` Sascha Hauer
2010-03-31 13:29 ` Daniel Mack
2010-03-31 16:41 ` Michał Mirosław
2010-03-30 18:32 ` [PATCH 3/3] ARM: MXC: mxcmmc: work around a bug in the SDHC busy line handling Daniel Mack
2010-03-31 12:38 ` Sascha Hauer [this message]
2010-03-31 13:02 ` [PATCH 1/3] ARM: MXC: mxcmmc: misc cleanups Daniel Mack
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=20100331123856.GW2241@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=dan.j.williams@intel.com \
--cc=daniel@caiaq.de \
--cc=jkosina@suse.cz \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mmc@vger.kernel.org \
--cc=volker.ernst@txtr.com \
/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 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).