summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2017-01-24 11:17:56 +0100
committerUlf Hansson <ulf.hansson@linaro.org>2017-02-13 13:20:39 +0100
commit7d552a48089b6a24b65abe9c49a184bae8364abe (patch)
tree9e3ba86c298358bdd4a8586fe9250511db4c4cbc /drivers/mmc/core
parentda0dbaffe354043bb0cd61c00c650c819d104b29 (diff)
downloadop-kernel-dev-7d552a48089b6a24b65abe9c49a184bae8364abe.zip
op-kernel-dev-7d552a48089b6a24b65abe9c49a184bae8364abe.tar.gz
mmc: block: introduce new_areq and old_areq
Recycling the same variable in an x=x+1 fashion may seem clever here but it makes the code terse and hard to follow for humans. Introduce a new_areq and old_areq variable so we see what is going on. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/core')
-rw-r--r--drivers/mmc/core/block.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c
index ea86a23..fc71b62 100644
--- a/drivers/mmc/core/block.c
+++ b/drivers/mmc/core/block.c
@@ -1634,7 +1634,8 @@ static int mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *rqc)
enum mmc_blk_status status;
struct mmc_queue_req *mq_rq;
struct request *req;
- struct mmc_async_req *areq;
+ struct mmc_async_req *new_areq;
+ struct mmc_async_req *old_areq;
if (!rqc && !mq->mqrq_prev->req)
return 0;
@@ -1654,11 +1655,12 @@ static int mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *rqc)
}
mmc_blk_rw_rq_prep(mq->mqrq_cur, card, 0, mq);
- areq = &mq->mqrq_cur->mmc_active;
+ new_areq = &mq->mqrq_cur->mmc_active;
} else
- areq = NULL;
- areq = mmc_start_req(card->host, areq, &status);
- if (!areq) {
+ new_areq = NULL;
+
+ old_areq = mmc_start_req(card->host, new_areq, &status);
+ if (!old_areq) {
/*
* We have just put the first request into the pipeline
* and there is nothing more to do until it is
@@ -1673,7 +1675,7 @@ static int mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *rqc)
* An asynchronous request has been completed and we proceed
* to handle the result of it.
*/
- mq_rq = container_of(areq, struct mmc_queue_req, mmc_active);
+ mq_rq = container_of(old_areq, struct mmc_queue_req, mmc_active);
brq = &mq_rq->brq;
req = mq_rq->req;
type = rq_data_dir(req) == READ ? MMC_BLK_READ : MMC_BLK_WRITE;
OpenPOWER on IntegriCloud