From: Grant Grundler <grundler@chromium.org>
To: Chris Ball <cjb@laptop.org>, Ulf Hansson <ulf.hansson@linaro.org>,
Seungwon Jeon <tgih.jun@samsung.com>
Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
Grant Grundler <grundler@chromium.org>
Subject: [PATCH 2/7] mmc: core: rename local var err to saved_err
Date: Thu, 26 Sep 2013 12:22:55 -0700 [thread overview]
Message-ID: <1380223380-22451-3-git-send-email-grundler@chromium.org> (raw)
In-Reply-To: <1380223380-22451-1-git-send-email-grundler@chromium.org>
Just making it more obvious 'err' refers to the status of the in flight
request (aka saved_areq) and not the new async request we might start.
Signed-off-by: Grant Grundler <grundler@chromium.org>
---
drivers/mmc/core/core.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index e5a40ee..675139e 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -527,7 +527,7 @@ static void mmc_post_req(struct mmc_host *host, struct mmc_request *mrq,
struct mmc_async_req *mmc_start_req(struct mmc_host *host,
struct mmc_async_req *areq, int *error)
{
- int err = 0;
+ int saved_err = 0;
int start_err = 0;
struct mmc_async_req *saved_areq = host->areq;
@@ -536,10 +536,10 @@ struct mmc_async_req *mmc_start_req(struct mmc_host *host,
mmc_pre_req(host, areq->mrq, !saved_areq);
if (saved_areq) {
- err = mmc_wait_for_data_req_done(host, saved_areq->mrq, areq);
- if (err == MMC_BLK_NEW_REQUEST) {
+ saved_err = mmc_wait_for_data_req_done(host, saved_areq->mrq, areq);
+ if (saved_err == MMC_BLK_NEW_REQUEST) {
if (error)
- *error = err;
+ *error = saved_err;
/*
* The previous request was not completed,
* nothing to return
@@ -556,23 +556,23 @@ struct mmc_async_req *mmc_start_req(struct mmc_host *host,
mmc_start_bkops(host->card, true);
}
- if (!err && areq)
+ if (!saved_err && areq)
start_err = __mmc_start_data_req(host, areq->mrq);
if (saved_areq)
mmc_post_req(host, saved_areq->mrq, 0);
/* Cancel a prepared request if it was not started. */
- if ((err || start_err) && areq)
+ if ((saved_err || start_err) && areq)
mmc_post_req(host, areq->mrq, -EINVAL);
- if (err)
+ if (saved_err)
host->areq = NULL;
else
host->areq = areq;
if (error)
- *error = err;
+ *error = saved_err;
return saved_areq;
}
EXPORT_SYMBOL(mmc_start_req);
--
1.8.4
next prev parent reply other threads:[~2013-09-26 19:25 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-26 19:22 [PATCH 0/7] mmc: core: cleanup and locking patches description Grant Grundler
2013-09-26 19:22 ` [PATCH 1/7] mmc: core: rename "data" to saved_areq Grant Grundler
2013-09-26 19:22 ` Grant Grundler [this message]
2013-09-26 19:22 ` [PATCH 3/7] mmc: core: restructure error handling for start req Grant Grundler
2013-09-26 19:22 ` [PATCH 4/7] mmc: core: use common code path to return error Grant Grundler
2013-09-26 19:22 ` [PATCH 5/7] mmc: core: handling polling more gracefully Grant Grundler
2013-09-26 19:22 ` [PATCH 6/7] mmc: core: protect references to host->areq with host->lock Grant Grundler
2013-10-09 0:48 ` Grant Grundler
2013-10-09 9:07 ` Ulf Hansson
2013-09-26 19:23 ` [PATCH 7/7] mmc: core: mmc_start_req is a misnomer -> mmc_process_areq Grant Grundler
2013-09-26 19:57 ` [PATCH 0/7] mmc: core: cleanup and locking patches description Grant Grundler
2013-10-03 20:35 ` Grant Grundler
[not found] ` <CAPDyKFqZHkDAKoaRM1vrUXCMVsAZBEs-PanjyoR=E=Lrp1aU7Q@mail.gmail.com>
2013-10-03 23:48 ` Grant Grundler
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=1380223380-22451-3-git-send-email-grundler@chromium.org \
--to=grundler@chromium.org \
--cc=cjb@laptop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=tgih.jun@samsung.com \
--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;
as well as URLs for NNTP newsgroup(s).