From patchwork Thu Jan 26 15:04:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 9539395 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AAAC9601D7 for ; Thu, 26 Jan 2017 15:04:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A4B962041F for ; Thu, 26 Jan 2017 15:04:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 99AB528138; Thu, 26 Jan 2017 15:04:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 044AA2041F for ; Thu, 26 Jan 2017 15:04:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753182AbdAZPEx (ORCPT ); Thu, 26 Jan 2017 10:04:53 -0500 Received: from mail-lf0-f46.google.com ([209.85.215.46]:35231 "EHLO mail-lf0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753168AbdAZPEw (ORCPT ); Thu, 26 Jan 2017 10:04:52 -0500 Received: by mail-lf0-f46.google.com with SMTP id n124so146578174lfd.2 for ; Thu, 26 Jan 2017 07:04:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=KJriGxrOQeFgx8Uo1Jb6m+lamKBrHNypGaruMq2rxgw=; b=OedZt6hfnDE60xp7XbRujlCdW0ErERvlnHtdT22J6W62xdsts4af0sNTkW5EZIuNDC 9vesYqjkxz8bxxDsKnUdEe51f+Q4MMb0c0s6Ge+C/Ep2omnLNDVTR+NfiRdbC13f+YRR Ot6Y8/04SoGso4FbBNeHko/ogtfMvmA5EYeTE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=KJriGxrOQeFgx8Uo1Jb6m+lamKBrHNypGaruMq2rxgw=; b=QVSBy388IL+WhebtGwC7Iuyq6A7E8WVy2MKXtf4+QZimLjJgrImJgP7TIkGyLByLY7 WisrzJdQnKFwfD7F05U7N2d4e/vHJu/OqS8AFeMaLuho/3qfzIBCbbtQAC9+GlIIkaCs kuAqNHvg5X22m5leYEGJjp3QBxTAJXLbF4cY55a6uvu5WSsQQMZFLVskJA8CyaZyp+M4 9YhLk1Y0MGbVHsGKd7UWyyMGPSwd7ZLkg3S7pG/4ZDUXwif4kXxfiazYK/ZStKuGRzZY qnENWFgAmLIu4peY3qKZjzxjq7rnBMmOqhlB3Ca27eTcfzW4P4N1zggYMSLESBjdgAeB JNRw== X-Gm-Message-State: AIkVDXJEv6Tu3m4g/8AMuHDtS3TdCwf4wdFuekvWCWH3KbIrpKxnXmZZ7hXyPcBbxNpO4g3l X-Received: by 10.25.211.7 with SMTP id k7mr1140912lfg.62.1485443090355; Thu, 26 Jan 2017 07:04:50 -0800 (PST) Received: from gnarp.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id s7sm540332lja.27.2017.01.26.07.04.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Jan 2017 07:04:49 -0800 (PST) From: Linus Walleij To: linux-mmc@vger.kernel.org, linux-block@vger.kernel.org, Ulf Hansson Cc: Chunyan Zhang , Baolin Wang , Paolo Valente , Linus Walleij Subject: [PATCH 3/6] mmc: core: rename mmc_start_req() to *areq() Date: Thu, 26 Jan 2017 16:04:30 +0100 Message-Id: <20170126150433.14038-3-linus.walleij@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170126150433.14038-1-linus.walleij@linaro.org> References: <20170126150433.14038-1-linus.walleij@linaro.org> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP With the coexisting __mmc_start_request(), mmc_start_request() and __mmc_start_req() it is a bit confusing that mmc_start_req() actually does not start a normal request, but an asynchronous request. Rename it to mmc_start_areq() to make it explicit what the function is doing, also fix the kerneldoc for this function while we're at it. Signed-off-by: Linus Walleij --- drivers/mmc/core/block.c | 8 ++++---- drivers/mmc/core/core.c | 14 +++++++------- drivers/mmc/core/mmc_test.c | 8 ++++---- include/linux/mmc/core.h | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c index aaade079603e..de9200470c13 100644 --- a/drivers/mmc/core/block.c +++ b/drivers/mmc/core/block.c @@ -1611,8 +1611,8 @@ static void mmc_blk_rw_start_new(struct mmc_queue *mq, struct mmc_card *card, blk_end_request_all(req, -EIO); } else { mmc_blk_rw_rq_prep(mq->mqrq_cur, card, 0, mq); - mmc_start_req(card->host, - &mq->mqrq_cur->mmc_active, NULL); + mmc_start_areq(card->host, + &mq->mqrq_cur->mmc_active, NULL); } } @@ -1650,7 +1650,7 @@ static void mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *new_req) } else new_areq = NULL; - old_areq = mmc_start_req(card->host, new_areq, &status); + old_areq = mmc_start_areq(card->host, new_areq, &status); if (!old_areq) { /* * We have just put the first request into the pipeline @@ -1771,7 +1771,7 @@ static void mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *new_req) */ mmc_blk_rw_rq_prep(mq_rq, card, disable_multi, mq); - mmc_start_req(card->host, + mmc_start_areq(card->host, &mq_rq->mmc_active, NULL); mq_rq->brq.retune_retry_done = retune_retry_done; } diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 8c458255e55a..ed1768cf464a 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -631,10 +631,10 @@ static void mmc_post_req(struct mmc_host *host, struct mmc_request *mrq, } /** - * mmc_start_req - start a non-blocking request + * mmc_start_areq - start an asynchronous request * @host: MMC host to start command - * @areq: async request to start - * @error: out parameter returns 0 for success, otherwise non zero + * @areq: asynchronous request to start + * @ret_stat: out parameter for status * * Start a new MMC custom command request for a host. * If there is on ongoing async request wait for completion @@ -646,9 +646,9 @@ static void mmc_post_req(struct mmc_host *host, struct mmc_request *mrq, * return the completed request. If there is no ongoing request, NULL * is returned without waiting. NULL is not an error condition. */ -struct mmc_async_req *mmc_start_req(struct mmc_host *host, - struct mmc_async_req *areq, - enum mmc_blk_status *ret_stat) +struct mmc_async_req *mmc_start_areq(struct mmc_host *host, + struct mmc_async_req *areq, + enum mmc_blk_status *ret_stat) { enum mmc_blk_status status = MMC_BLK_SUCCESS; int start_err = 0; @@ -708,7 +708,7 @@ struct mmc_async_req *mmc_start_req(struct mmc_host *host, *ret_stat = status; return data; } -EXPORT_SYMBOL(mmc_start_req); +EXPORT_SYMBOL(mmc_start_areq); /** * mmc_wait_for_req - start a request and wait for completion diff --git a/drivers/mmc/core/mmc_test.c b/drivers/mmc/core/mmc_test.c index 83d193c09d98..f99ac3123fd2 100644 --- a/drivers/mmc/core/mmc_test.c +++ b/drivers/mmc/core/mmc_test.c @@ -853,7 +853,7 @@ static int mmc_test_nonblock_transfer(struct mmc_test_card *test, for (i = 0; i < count; i++) { mmc_test_prepare_mrq(test, cur_areq->mrq, sg, sg_len, dev_addr, blocks, blksz, write); - done_areq = mmc_start_req(test->card->host, cur_areq, &status); + done_areq = mmc_start_areq(test->card->host, cur_areq, &status); if (status != MMC_BLK_SUCCESS || (!done_areq && i > 0)) { ret = RESULT_FAIL; @@ -872,7 +872,7 @@ static int mmc_test_nonblock_transfer(struct mmc_test_card *test, dev_addr += blocks; } - done_areq = mmc_start_req(test->card->host, NULL, &status); + done_areq = mmc_start_areq(test->card->host, NULL, &status); if (status != MMC_BLK_SUCCESS) ret = RESULT_FAIL; @@ -2402,7 +2402,7 @@ static int mmc_test_ongoing_transfer(struct mmc_test_card *test, /* Start ongoing data request */ if (use_areq) { - mmc_start_req(host, &test_areq.areq, &blkstat); + mmc_start_areq(host, &test_areq.areq, &blkstat); if (blkstat != MMC_BLK_SUCCESS) { ret = RESULT_FAIL; goto out_free; @@ -2440,7 +2440,7 @@ static int mmc_test_ongoing_transfer(struct mmc_test_card *test, /* Wait for data request to complete */ if (use_areq) { - mmc_start_req(host, NULL, &blkstat); + mmc_start_areq(host, NULL, &blkstat); if (blkstat != MMC_BLK_SUCCESS) ret = RESULT_FAIL; } else { diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h index 6dcb339fcd45..a0c63ea28796 100644 --- a/include/linux/mmc/core.h +++ b/include/linux/mmc/core.h @@ -158,7 +158,7 @@ struct mmc_request { struct mmc_card; struct mmc_async_req; -struct mmc_async_req *mmc_start_req(struct mmc_host *host, +struct mmc_async_req *mmc_start_areq(struct mmc_host *host, struct mmc_async_req *areq, enum mmc_blk_status *ret_stat); void mmc_wait_for_req(struct mmc_host *host, struct mmc_request *mrq);