[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1380223380-22451-3-git-send-email-grundler@chromium.org>
Date: Thu, 26 Sep 2013 12:22:55 -0700
From: Grant Grundler <grundler@...omium.org>
To: Chris Ball <cjb@...top.org>, Ulf Hansson <ulf.hansson@...aro.org>,
Seungwon Jeon <tgih.jun@...sung.com>
Cc: linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org,
Grant Grundler <grundler@...omium.org>
Subject: [PATCH 2/7] mmc: core: rename local var err to saved_err
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@...omium.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists