From patchwork Fri Jun 30 12:06:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 106689 Delivered-To: patch@linaro.org Received: by 10.182.135.102 with SMTP id pr6csp5835149obb; Fri, 30 Jun 2017 05:10:28 -0700 (PDT) X-Received: by 10.99.99.193 with SMTP id x184mr20324999pgb.13.1498824628498; Fri, 30 Jun 2017 05:10:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498824628; cv=none; d=google.com; s=arc-20160816; b=0x747p4QzUM4rNtDG8qgiiqRJyomlo6g2wEjsZ1yB5oWBkvBySmqyyGfcCdma3b900 Dv/BDF+KYknpnjC+wDz9vImzW9A1CtuQmw6Cs6Fkx+bN21pHJvDGUvUTDY8336/JUzq0 8NVnsREFSaRdSReWDJ6EallNqH0TSJ6fkBAfYKV6ucNTprFzev2iGLQC2XE2ofyP/qcv rPys5msiWPSFiluA564ADYKxnuu0nrx5aQFW7phSeEz4fCOsaaVaPh8R81qObXlKZDXn xx8kMiYLa7i1MMfUEOcQJivCjCsOfs5iBr6ojNlVRykoVGJYeWrlhN63jlYSrSrP/wFq G2Ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=nOg/YDmo3s/84azF23QesXNXGrnmoU4YqET2yI3vQfA=; b=dNIZFUe7TREy6gjyjkJWTohh9l2p1qwiOWo/FjJP47tKribpKr9RFygygCC2BQRd2E PA0aZ2vgVafW39VKvqVZZa6dywFyPFeR1HXicb/9xc6eCn9VyERK2rgpB8SMk/zMPf0K xkRZrIn+nPp20sdp5vkoq1f/J0cGoPNmhhQFnSTdYDQwDvFCnV6GQOSeA+XeTpmXdgHE ue0tMQEKfjz636w+MZGEnJOh2n4PuR1EEOKP4MkUEl34oADrXA1GEoF34+eRUqtG07G6 t8xUJg3uCLr+mk3Nk4NLIbV/PlkYYA2rng33Oioam9cXNVc1u3dKhWsFz3yG9tQAYZW7 z73w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.b=fLbClIvK; 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 m63si6016544pld.547.2017.06.30.05.10.28; Fri, 30 Jun 2017 05:10:28 -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 header.b=fLbClIvK; 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 S1751917AbdF3MIu (ORCPT + 6 others); Fri, 30 Jun 2017 08:08:50 -0400 Received: from mail-lf0-f45.google.com ([209.85.215.45]:34615 "EHLO mail-lf0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751649AbdF3MHO (ORCPT ); Fri, 30 Jun 2017 08:07:14 -0400 Received: by mail-lf0-f45.google.com with SMTP id l13so69096079lfl.1 for ; Fri, 30 Jun 2017 05:07:13 -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; bh=RbY4bC/SeC0wuejhgGeaK30nwvkyj8U7rG0F7g0UyEk=; b=fLbClIvKlSfIfCF20xhI3txGaw+VV01r4sTxL2IS016+QEAKZkdTzMbvxeMaV0ehb7 yxVxLO0A0NWvg/LWcZngRycNwDnBgl7ARDkqnajTctnVw9R9HpiSvTJ437Cme21kszli LuCNSccUChvtGquALHBDZyPa2PkXAeysIWZjI= 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; bh=RbY4bC/SeC0wuejhgGeaK30nwvkyj8U7rG0F7g0UyEk=; b=Lx2aAtV3OcjdgLK0EHPdwf7BntS1O8Chxg8Y9fg5Gk+2q8+a0ByCEvTmkUvTXHyu2H +g6jjLC9R5MY2yIFp/Q1mYADCl8/ADArptGWDOn0BsL441FBqVOS62zsA9Pqg9Do0/Jy GBRTfGceaP2LpMNQlnKibsVr1fpxlIE2aXNTJREjxyPAQqJKGHFwjzZQhueS5DUlMgkT 6lrLx/RpduGQrAG2igXchrLY1nptgUK4c/diVmV+pRezwegKhPRYpTOtdrFGjpAqVW7O PQsrHGX9o3vDVX7ZJEQVF+F+EXMS0MSugGvJe1e6B4AZsKGyAVOzcFliamOURq0ZpZhF +CcA== X-Gm-Message-State: AKS2vOzVHTa1PzYPHOewe1RitwJ0CkGd0LX7oVYQDGYaWaGhXAVfxk3O 176wbZf7/qEoLzOE4MPHfw== X-Received: by 10.25.153.134 with SMTP id b128mr2785974lfe.90.1498824432029; Fri, 30 Jun 2017 05:07:12 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id 19sm1531492ljv.62.2017.06.30.05.07.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Jun 2017 05:07:10 -0700 (PDT) From: Linus Walleij To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: linux-block@vger.kernel.org, Jens Axboe , Christoph Hellwig , Arnd Bergmann , Bartlomiej Zolnierkiewicz , Paolo Valente , Avri Altman , Adrian Hunter , Linus Walleij Subject: [PATCH 1/3 v4] mmc: block: Anonymize the drv op data pointer Date: Fri, 30 Jun 2017 14:06:47 +0200 Message-Id: <20170630120649.27007-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.9.4 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org We have a data pointer for the ioctl() data, but we need to pass other data along with the DRV_OP:s, so make this a void * so it can be reused. Signed-off-by: Linus Walleij --- ChangeLog v3->v4: - No changes just resending ChangeLog v2->v3: - No changes just resending --- drivers/mmc/core/block.c | 8 +++++--- drivers/mmc/core/queue.h | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) -- 2.9.4 -- 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 3c7efbdc8591..d410f578b8df 100644 --- a/drivers/mmc/core/block.c +++ b/drivers/mmc/core/block.c @@ -598,7 +598,7 @@ static int mmc_blk_ioctl_cmd(struct block_device *bdev, __GFP_RECLAIM); idatas[0] = idata; req_to_mmc_queue_req(req)->drv_op = MMC_DRV_OP_IOCTL; - req_to_mmc_queue_req(req)->idata = idatas; + req_to_mmc_queue_req(req)->drv_op_data = idatas; req_to_mmc_queue_req(req)->ioc_count = 1; blk_execute_rq(mq->queue, NULL, req, 0); ioc_err = req_to_mmc_queue_req(req)->drv_op_result; @@ -674,7 +674,7 @@ static int mmc_blk_ioctl_multi_cmd(struct block_device *bdev, idata[0]->ic.write_flag ? REQ_OP_DRV_OUT : REQ_OP_DRV_IN, __GFP_RECLAIM); req_to_mmc_queue_req(req)->drv_op = MMC_DRV_OP_IOCTL; - req_to_mmc_queue_req(req)->idata = idata; + req_to_mmc_queue_req(req)->drv_op_data = idata; req_to_mmc_queue_req(req)->ioc_count = num_of_cmds; blk_execute_rq(mq->queue, NULL, req, 0); ioc_err = req_to_mmc_queue_req(req)->drv_op_result; @@ -1175,6 +1175,7 @@ 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; + struct mmc_blk_ioc_data **idata; int ret; int i; @@ -1182,8 +1183,9 @@ static void mmc_blk_issue_drv_op(struct mmc_queue *mq, struct request *req) switch (mq_rq->drv_op) { case MMC_DRV_OP_IOCTL: + idata = mq_rq->drv_op_data; for (i = 0; i < mq_rq->ioc_count; i++) { - ret = __mmc_blk_ioctl_cmd(card, md, mq_rq->idata[i]); + ret = __mmc_blk_ioctl_cmd(card, md, idata[i]); if (ret) break; } diff --git a/drivers/mmc/core/queue.h b/drivers/mmc/core/queue.h index 361b46408e0f..cf26a15a64bf 100644 --- a/drivers/mmc/core/queue.h +++ b/drivers/mmc/core/queue.h @@ -51,7 +51,7 @@ struct mmc_queue_req { struct mmc_async_req areq; enum mmc_drv_op drv_op; int drv_op_result; - struct mmc_blk_ioc_data **idata; + void *drv_op_data; unsigned int ioc_count; };