From patchwork Sun Aug 20 21:39:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 110484 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp521389qge; Sun, 20 Aug 2017 14:39:25 -0700 (PDT) X-Received: by 10.99.114.85 with SMTP id c21mr10882307pgn.81.1503265165463; Sun, 20 Aug 2017 14:39:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503265165; cv=none; d=google.com; s=arc-20160816; b=woraQ7/0iFWBRkZ7x7LqC5h1X2S3oV7i9Kch3TFErAcaTKgr36fB6uK+f1ujSAqxFm WBPT+ncQsEznxQRFEGEeP30B7pyvGRk9UWFQWc0+wdqDpb+fSx8Qj5ndQ6gFpzDdakIK fEtV4jmGEWqepaiF51tVls0vuRNmvFB0DA1c0SLWslQHdudkeAB5vDjxDaUDHF7+f3Tk Ut3y/UVDbYXKb+qngdwZ6yGwNPoGFymXWrmv/jwHx35VKBPM+rIWcii85MxrQkrvB5uO PdpTvD8Rf8g6bsYB/Dp56j+S6q9P51Jrywqp/J1kevO8EzjId/UH0O1z/vp3XxLrM/Dj AlMw== 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=821cP3dP3PVFYhlebj5ZhCc9Jq0Tr5drbSVKFOj4XCY=; b=sTmRySVi9/9aky3jpRwvkFeoiunNxeQxdP0ESKskHJ90XQKI9jqBKFwN4MIsXeJmbR CejjJqNQoOiPsoD6kujvIb5LsYD6AWH7IgY07uj6lx9IDmtDegT+yOH/0bOwUL3vte/T zagWFUDAZxfbyfKE5NM831/eae8jvT7e6bTqJap1DTn9GvCON8agWBQrk0htS4yRjSk1 01U2R69DXBg9EwJopcqIKthqx5YxgYF1AgWSSB+7I4CfuioJ8T4pww66hAgoVz/9CgrA 1Sip8nl5N62IfsAenehD2LfUSUWKCkyr9YoQpTA6PhFTsa240CD+WihsQaOB3M6qDdTq yARA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=CtlpctRo; 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 z1si3544613pgn.611.2017.08.20.14.39.25; Sun, 20 Aug 2017 14:39:25 -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.s=google header.b=CtlpctRo; 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 S1753341AbdHTVjY (ORCPT + 6 others); Sun, 20 Aug 2017 17:39:24 -0400 Received: from mail-lf0-f41.google.com ([209.85.215.41]:36365 "EHLO mail-lf0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753300AbdHTVjX (ORCPT ); Sun, 20 Aug 2017 17:39:23 -0400 Received: by mail-lf0-f41.google.com with SMTP id f123so10435851lfe.3 for ; Sun, 20 Aug 2017 14:39:23 -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=F23afzBnA/K1nNlQkhyT/X/HjdTcXv5wB1TABpphU3I=; b=CtlpctRoF0uN3lK6BS5sV/xdt7OgS280Yxgzv05IcaSU6cN17ruajowneUetsw4jdv 8u3sW2I0MU4wumS00equyqQxfYZx8avIa7DJo/EcBuzxiWPrnIiwmvgP7vdUgpnkfEBK 88tyPMINshulA0Mv8jx8u1ZuX9t+3rwwlIL4U= 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=F23afzBnA/K1nNlQkhyT/X/HjdTcXv5wB1TABpphU3I=; b=tcK1FrTqJQaG5kUQNQwS1Dyy4FzSlpHCCRb2dbVlSWYMFkzf1ChgqOVHL7ZWfnQsid TVnM7o57EF/Jrd9ysBIdHRJKFCkgGCcLok/TiquN3gBmKUpl/+YJmpqiHLnTwKZRg7uH 5bRUyPyeZpi1H3B+3dd64J06oYOD0pdjt8HRMHYGs3djXTtxgCOSteBLSQmlZR5TD7Fz WyHEYxqpGMiPhORDhWqfRobY2lDq8b28GvuRjAfOmnLp6wMJGCnp0hYcLQ+3P/J7ZyGm 5ZlX/AQL9SD9+2P4yG4vmL+zm3aSzS0nnXiuUpNQadl4VFAfFPW2bA8ovcEoyy+EJhTD HeqQ== X-Gm-Message-State: AHYfb5gUNpzc638PWxBLoQvxOpOb3op54ILpMM+tvKj+5oxHXMP7NYWC Y1DP7hRjPi+OkdEym8kIXg== X-Received: by 10.25.199.147 with SMTP id x141mr424817lff.124.1503265162332; Sun, 20 Aug 2017 14:39:22 -0700 (PDT) Received: from genomnajs.bredbandsbolaget.se (c-097b71d5.014-348-6c756e10.cust.bredbandsbolaget.se. [213.113.123.9]) by smtp.gmail.com with ESMTPSA id f136sm2381830lff.34.2017.08.20.14.39.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 20 Aug 2017 14:39:21 -0700 (PDT) From: Linus Walleij To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: Linus Walleij Subject: [PATCH 1/8 v5] mmc: block: Anonymize the drv op data pointer Date: Sun, 20 Aug 2017 23:39:06 +0200 Message-Id: <20170820213913.9737-2-linus.walleij@linaro.org> X-Mailer: git-send-email 2.13.5 In-Reply-To: <20170820213913.9737-1-linus.walleij@linaro.org> References: <20170820213913.9737-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 v3->v5: - No changes just resending 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.13.5 -- 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 91e1e93f40e3..30b8b979ea62 100644 --- a/drivers/mmc/core/block.c +++ b/drivers/mmc/core/block.c @@ -596,7 +596,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; @@ -675,7 +675,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; @@ -1176,6 +1176,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; @@ -1183,8 +1184,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, ret = 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; };