From: Fabio Estevam <festevam@gmail.com>
To: ulf.hansson@linaro.org
Cc: linux-mmc@vger.kernel.org, Fabio Estevam <fabio.estevam@freescale.com>
Subject: [PATCH 2/3] mmc: host: mxcmmc: Simplify a trivial if-return sequence
Date: Sat, 9 May 2015 18:44:50 -0300 [thread overview]
Message-ID: <1431207891-21448-2-git-send-email-festevam@gmail.com> (raw)
In-Reply-To: <1431207891-21448-1-git-send-email-festevam@gmail.com>
From: Fabio Estevam <fabio.estevam@freescale.com>
Simplify a trivial if-return sequence. Possibly combine with a
preceding function call.
The semantic patch that makes this change is available
in scripts/coccinelle/misc/simple_return.cocci.
More information about semantic patching is available at
http://coccinelle.lip6.fr/
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
drivers/mmc/host/mxcmmc.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c
index 317d709..d110f9e 100644
--- a/drivers/mmc/host/mxcmmc.c
+++ b/drivers/mmc/host/mxcmmc.c
@@ -605,11 +605,7 @@ static int mxcmci_push(struct mxcmci_host *host, void *_buf, int bytes)
mxcmci_writel(host, cpu_to_le32(tmp), MMC_REG_BUFFER_ACCESS);
}
- stat = mxcmci_poll_status(host, STATUS_BUF_WRITE_RDY);
- if (stat)
- return stat;
-
- return 0;
+ return mxcmci_poll_status(host, STATUS_BUF_WRITE_RDY);
}
static int mxcmci_transfer_data(struct mxcmci_host *host)
--
1.9.1
next prev parent reply other threads:[~2015-05-09 21:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-09 21:44 [PATCH 1/3] mmc: card: mmc_test: Simplify a trivial if-return sequence Fabio Estevam
2015-05-09 21:44 ` Fabio Estevam [this message]
2015-05-11 10:30 ` [PATCH 2/3] mmc: host: mxcmmc: " Ulf Hansson
2015-05-09 21:44 ` [PATCH 3/3] mmc: host: sdhci: Use BUG_ON() Fabio Estevam
2015-05-11 10:31 ` Ulf Hansson
2015-05-11 10:30 ` [PATCH 1/3] mmc: card: mmc_test: Simplify a trivial if-return sequence Ulf Hansson
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=1431207891-21448-2-git-send-email-festevam@gmail.com \
--to=festevam@gmail.com \
--cc=fabio.estevam@freescale.com \
--cc=linux-mmc@vger.kernel.org \
--cc=ulf.hansson@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox