From patchwork Fri May 19 13:37:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 100193 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp319226qge; Fri, 19 May 2017 06:37:59 -0700 (PDT) X-Received: by 10.99.139.195 with SMTP id j186mr10555919pge.134.1495201079349; Fri, 19 May 2017 06:37:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1495201079; cv=none; d=google.com; s=arc-20160816; b=H7FWtpmECWdUueSaRKQwaDWJ0qJPZ3CXgVJTfF+5gSsXWm9YB5p0hWCPo4vAW+2+cp VTvPKzhHlnz3BrXpDUEfDOaKFhQkZcl59NxMbUB32LPBvfh/GGIqg9PXh92FUgBlulBL /ItEGPZlmmq8bwl6UG0on+tgq5maxqnN5vtuxHLChgAiZxVb8PWEM+2rjvOHIjRjfOFZ fkkwkSOEUOiJbOX1qYDCP1LYZm34TJSA9E7OA5SER3UNCM5xXpGQzsu0OgwqQmJTsmcn Ky1cs2ZmrN7154T73EmMqbP4AZ5hwYaRBHEoXv4hZrCadh/Lz2g3kW9jdAPty+fC69c1 vKKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=tbq41NNC2zqTRrwr00UhhAgyFdquJOayeviPoiHfXK0=; b=KPEGg++ze4/uVkl4uv+v0lH6ey9jU1S2X/DlB0x7poRGv06cLhgBxUS8jT7kN3K79F 3pV3D5XE8zyvfhMoyiz+v+fPIQNAX66VtMTL9T+dtqdVgttg2/1lXr04e6+lgmyIYtu0 1HAokRFkCvYUnq3A4hN0JWWdymq4Z/Rqp3EPQ9Hxm25OWoZNjjdvDU/Lo3uoTX01VxkR ZD9eqpy1jeQmyIciTyLQC1xHWyWOhbS3p8HcWHuY+FXneQV+N0BOEIxOzix0QNdDwPQ+ uglg+99p/jO9qcKhmseyVcfFQ3vq2S2iWJ3l6Ujeo5dF4raWUfr3/5NVzcqZ3F6MkRqt Aucg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 33si8689720plb.270.2017.05.19.06.37.59; Fri, 19 May 2017 06:37:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755001AbdESNh6 (ORCPT + 6 others); Fri, 19 May 2017 09:37:58 -0400 Received: from mail-lf0-f44.google.com ([209.85.215.44]:34485 "EHLO mail-lf0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752868AbdESNh5 (ORCPT ); Fri, 19 May 2017 09:37:57 -0400 Received: by mail-lf0-f44.google.com with SMTP id 99so1211839lfu.1 for ; Fri, 19 May 2017 06:37:56 -0700 (PDT) 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=/38oOOCKu8MPEpX7e+J5NkGE0zIn39Y/5Ajb9TiwfGw=; b=Eruiibd0pNjjNfktX4goVsua3LGMJJh89n6pmDd1jiV5UYqowGTx8SUxXAAOjscO8T +TKaAERl/qJX74TW6wSNTCDkSph1a7J5UEqmgHTNF3QMy2GqfJn9cFUg2+23UOjQogus D5ULQLds1P+F1xVX4s/jqJnTHH1RI5qgGVc4o= 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=/38oOOCKu8MPEpX7e+J5NkGE0zIn39Y/5Ajb9TiwfGw=; b=oP0H1E2JbTaqjgc8c2Nnp/lMGqMhXZBsUQdlh2S0n0rXMk8nawpxj2/mc0e1PprIJX P7kAdPF0g8qTiGo1WAyDxlDcD0bfd1L1PDcJu3ChVOH7Jg3D3I7waZoV1DL+fVegn+M6 eTtSKP46i/qozEIJCvhycxPpA4xd3Wm5zz5RoC5P6tsZnxxchk5gs8O5KM6SIpLr+T25 q8NDOf1Z24ldBgy6lJNsdX24VKgxQq3HqNgHAG8kj3tjg/H2t3NyIj6f3anTAQ7UKUEM ejcDcfvlq/2xNnlw4+3KieJznUGelJ6kcYJMDrP3AH/sgq3YNFYB95IMTR4vYNE4JFHk BtTQ== X-Gm-Message-State: AODbwcCP2Fa8L4G9p/kGxZuehF/kcq8Es8kC/teYZvyMZH6RKtXf6+IW gAJ2LLRb2kuCVjDl X-Received: by 10.25.221.198 with SMTP id w67mr2434284lfi.114.1495201075592; Fri, 19 May 2017 06:37:55 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id 19sm1514130ljf.32.2017.05.19.06.37.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 May 2017 06:37:54 -0700 (PDT) From: Linus Walleij To: linux-mmc@vger.kernel.org, Ulf Hansson , Adrian Hunter Cc: linux-block@vger.kernel.org, Jens Axboe , Christoph Hellwig , Arnd Bergmann , Bartlomiej Zolnierkiewicz , Paolo Valente , Avri Altman , Linus Walleij Subject: [PATCH 3/6] mmc: block: Move DRV OP issue function Date: Fri, 19 May 2017 15:37:29 +0200 Message-Id: <20170519133732.27470-4-linus.walleij@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170519133732.27470-1-linus.walleij@linaro.org> References: <20170519133732.27470-1-linus.walleij@linaro.org> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org We will need to access static functions above the pure block layer operations in the file, so move the driver operations issue function down so we can see all non-blocklayer symbols. Signed-off-by: Linus Walleij --- drivers/mmc/core/block.c | 74 ++++++++++++++++++++++++------------------------ 1 file changed, 37 insertions(+), 37 deletions(-) -- 2.9.3 -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c index b24e7f5171c9..75b1baacf28b 100644 --- a/drivers/mmc/core/block.c +++ b/drivers/mmc/core/block.c @@ -618,43 +618,6 @@ static int mmc_blk_ioctl_cmd(struct block_device *bdev, return ioc_err ? ioc_err : err; } -/* - * The non-block commands come back from the block layer after it queued it and - * processed it with all other requests and then they get issued in this - * function. - */ -static void mmc_blk_issue_drv_op(struct mmc_queue *mq, struct request *req) -{ - struct mmc_queue_req *mq_rq; - struct mmc_card *card = mq->card; - struct mmc_blk_data *md = mq->blkdata; - int ioc_err; - int i; - - mq_rq = req_to_mmc_queue_req(req); - - switch (mq_rq->drv_op) { - case MMC_DRV_OP_IOCTL: - for (i = 0; i < mq_rq->ioc_count; i++) { - ioc_err = - __mmc_blk_ioctl_cmd(card, md, mq_rq->idata[i]); - if (ioc_err) - break; - } - mq_rq->ioc_result = ioc_err; - - /* Always switch back to main area after RPMB access */ - if (md->area_type & MMC_BLK_DATA_AREA_RPMB) - mmc_blk_part_switch(card, dev_get_drvdata(&card->dev)); - - blk_end_request_all(req, ioc_err); - break; - default: - /* Unknown operation */ - break; - } -} - static int mmc_blk_ioctl_multi_cmd(struct block_device *bdev, struct mmc_ioc_multi_cmd __user *user) { @@ -1222,6 +1185,43 @@ int mmc_access_rpmb(struct mmc_queue *mq) return false; } +/* + * The non-block commands come back from the block layer after it queued it and + * processed it with all other requests and then they get issued in this + * function. + */ +static void mmc_blk_issue_drv_op(struct mmc_queue *mq, struct request *req) +{ + struct mmc_queue_req *mq_rq; + struct mmc_card *card = mq->card; + struct mmc_blk_data *md = mq->blkdata; + int ioc_err; + int i; + + mq_rq = req_to_mmc_queue_req(req); + + switch (mq_rq->drv_op) { + case MMC_DRV_OP_IOCTL: + for (i = 0; i < mq_rq->ioc_count; i++) { + ioc_err = + __mmc_blk_ioctl_cmd(card, md, mq_rq->idata[i]); + if (ioc_err) + break; + } + mq_rq->ioc_result = ioc_err; + + /* Always switch back to main area after RPMB access */ + if (md->area_type & MMC_BLK_DATA_AREA_RPMB) + mmc_blk_part_switch(card, dev_get_drvdata(&card->dev)); + + blk_end_request_all(req, ioc_err); + break; + default: + /* Unknown operation */ + break; + } +} + static void mmc_blk_issue_discard_rq(struct mmc_queue *mq, struct request *req) { struct mmc_blk_data *md = mq->blkdata;