From patchwork Mon Jun 5 12:15:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 101384 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp881343qgd; Mon, 5 Jun 2017 05:15:37 -0700 (PDT) X-Received: by 10.99.123.27 with SMTP id w27mr11099857pgc.6.1496664936951; Mon, 05 Jun 2017 05:15:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496664936; cv=none; d=google.com; s=arc-20160816; b=S5ysJvrpascQ4oykZY2X1oxRRznVSh6OPVNsgODhOL2P9yPqhjYBxx9BooN+WRgVoq jn/1BLpirgjj7XZk20Fu3DenKg/fV6bhLzPBnNQ0dPLsRDMIU/Xmdj19HoE/b9GQNBm5 /hFvoFwyr2cXkg2Ns5MrjCnvZixGDcT0T5zNcBWj+GDf3ed6U8H5xIDp3jikpYdB4QHy kk3k7nGjtYE5nJ/Zt9Gx76TaV1lH/rpVDb6PaxbLTcheWeh+XKlMlsKc9gRSqomtX3uV esd/Z6VXFy+EiDxQkWLqskQf7cabdsdU1RPkkgGgkqhQQO4ckfk4GHPMzHMz7Me2hUR5 gQ8Q== 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=g4PRLDxOyUY6J4eP03LAwWc/qPzgjrq6J6n+3pfJ/LQ=; b=G+1w6kWgyH/apO2sUy7pA7xoIlUPrqTsqzbFtsi2dKryTmXzGzKxhwb2n0yZovyqh0 PLdEtEHcic8DBSeNpS9tEEBnRkv4uy878+F8dJ35vke6te3KufPiaKPy2VIWP37cdtBf /4ZpYunjFbD/E5/6T1N5fQIHQzdi7Aryks6cYkvLZXNoTxviG3a0q3S5jPAbui5HbLcz xxmciHqHBwOUUzq2ktm0rcoudRmu/uGoeh0Jg4OuGejST3w0cLqqCoYdqdDGS2GoyM3u GjFtzQMRQxO6sd8z1qp4ZW19DQPjU7C6fLnE98gydHKE9vD5pFj/75fXspOCmIQfwj8B ltgQ== 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 g15si7234976plm.413.2017.06.05.05.15.36; Mon, 05 Jun 2017 05:15:36 -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 S1751313AbdFEMPg (ORCPT + 6 others); Mon, 5 Jun 2017 08:15:36 -0400 Received: from mail-lf0-f54.google.com ([209.85.215.54]:34892 "EHLO mail-lf0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751290AbdFEMPf (ORCPT ); Mon, 5 Jun 2017 08:15:35 -0400 Received: by mail-lf0-f54.google.com with SMTP id p189so3737706lfe.2 for ; Mon, 05 Jun 2017 05:15:34 -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=1O4BD5ewj77am0EplnhQ4JscIFNrL+P39zKCkfU6hgc=; b=Ad8SinmjuLhP6c45LcH/0XY2b7Qy/zoGY+yrIc2vCGRCt91M745X2cWb7iNf958A0v RXgb3NfwhwxzKivfMdRoatLPCbIST6m7Rn7LPidwqddp5nC2U94b2D5Mpvw86B+b1yZl /IiyjqcDH03Na2A8omHkPut9e2eZjIdyP8Yxs= 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=1O4BD5ewj77am0EplnhQ4JscIFNrL+P39zKCkfU6hgc=; b=dwfh40JTBqkMnc0zlSSbWKsV6JZ56NXV/Z9xBrOide4yOmOxt6j5GkWqZjDs9uUZ4y 4o4G2lJHViVlRT8N6nZiAqU2KPelVthayXFbwoFl6FOnN35WjaHFHKu20g4NHArNYqeL wys+g1UiANq2xoslKyrO93XnQg67xWVpbvwFIy44wJsg+cy1bkb+5XCXczMgE24NdXtM A5FGz+uNd8LmS94kLzP+ntAs5bW76f6khupDL0cbAwoGLjWCVJa5ufuZ5Czr5iwikU04 I/p9rbPC7hUsgPLI2lkq5tdST4azxbDS7Wf+246j8mCCW2jlrbB6NION7TV13DESe03V p4lw== X-Gm-Message-State: AODbwcBbSCxMO/7LVXBe89LciwS02O/O7a395PFIRFkH/PI9OovNB4cA AXAgCGmQmrN9d/yfM5fU0g== X-Received: by 10.46.92.131 with SMTP id q125mr6581626ljb.57.1496664933639; Mon, 05 Jun 2017 05:15:33 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id z10sm6797124lja.24.2017.06.05.05.15.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Jun 2017 05:15:32 -0700 (PDT) From: Linus Walleij To: linux-mmc@vger.kernel.org, Ulf Hansson , Adrian Hunter Cc: Linus Walleij Subject: [PATCH 1/4 v2] mmc: block: Anonymize the drv op data pointer Date: Mon, 5 Jun 2017 14:15:19 +0200 Message-Id: <20170605121522.27678-2-linus.walleij@linaro.org> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170605121522.27678-1-linus.walleij@linaro.org> References: <20170605121522.27678-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 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 v1->v2: - Break out from the other patch --- 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 64f9fda92229..7a365d7641b5 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; };