From patchwork Fri Nov 18 12:36:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 82878 Delivered-To: patch@linaro.org Received: by 10.140.97.165 with SMTP id m34csp51074qge; Fri, 18 Nov 2016 04:36:31 -0800 (PST) X-Received: by 10.13.222.134 with SMTP id h128mr2976897ywe.139.1479472591887; Fri, 18 Nov 2016 04:36:31 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j197si1632030ywb.470.2016.11.18.04.36.31; Fri, 18 Nov 2016 04:36:31 -0800 (PST) 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 dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752084AbcKRMgb (ORCPT + 4 others); Fri, 18 Nov 2016 07:36:31 -0500 Received: from mail-wm0-f48.google.com ([74.125.82.48]:35398 "EHLO mail-wm0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751797AbcKRMga (ORCPT ); Fri, 18 Nov 2016 07:36:30 -0500 Received: by mail-wm0-f48.google.com with SMTP id a197so35535557wmd.0 for ; Fri, 18 Nov 2016 04:36:29 -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=zeY7JYLKfzybpYbjLKdkcEUJmH48ycICfuywBtE5FmQ=; b=g1DXflFPIMnw299JePnCseRKAeeZmx93us+ekDbx/sanseZgBV6ZdR7ivghbXmayzh FzgT5l0PmbYNFY4rEoVaczcy3NROKorhIWjovvZRpQ9dHJuQZLXE6gnUDM+dFaFSnBta S0NngvXX4C3mK94xZ29V3UFfTK7J3nfLHml+4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=zeY7JYLKfzybpYbjLKdkcEUJmH48ycICfuywBtE5FmQ=; b=i9WP2UWj4x/CeU18kocYN2KHM4GMsBWpcTa+nnJ1ihWqWogLqFUUW1hThrxc94545X 1Q6vacNIrGA2JW1UyOZlYc0rexJJRLTdsdHJQZTuCx2zAFbDyhBcWVM50AH6aAVIKAQf M48bWJhCk8BDASuHuqSN8vlFQVqK8fYcD9fz+F0n5SZAki57laPdpBiYbu1LNm8/a+5R ih+LVc7mEV4N2TL/r+Z9YZf/MZ5dKLqjn1Josx8QdqvR9kLIHQTXuY5Mza+/B8ypmITm tc36tOXLECOhmTKIDHw4KRHfhBvoSc9JJ645W1sbC9gqRV06rITkdaW2Vy8niiB8jLLY x5yQ== X-Gm-Message-State: ABUngvfopWSwRlc4PEfn9pQtBsxmjeyji79PAWLo1+YUSUGKy5bOuFx9SIJB3pf0MuEbPSzg X-Received: by 10.25.234.214 with SMTP id y83mr1571340lfi.153.1479472588637; Fri, 18 Nov 2016 04:36:28 -0800 (PST) Received: from linuslaptop.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id m81sm2168038lfd.45.2016.11.18.04.36.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Nov 2016 04:36:28 -0800 (PST) From: Linus Walleij To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: Chunyan Zhang , Baolin Wang , Linus Walleij Subject: [PATCH 2/3] mmc: block: rename data to blkdata Date: Fri, 18 Nov 2016 13:36:15 +0100 Message-Id: <1479472576-2687-3-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1479472576-2687-1-git-send-email-linus.walleij@linaro.org> References: <1479472576-2687-1-git-send-email-linus.walleij@linaro.org> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org The struct mmc_blk_request contains an opaque void *data that is actually only used to store a pointer to a per-request struct mmc_blk_data. This is confusing, so rename the member to blkdata and forward-declare the block.c local struct. Signed-off-by: Linus Walleij --- drivers/mmc/card/block.c | 20 ++++++++++---------- drivers/mmc/card/queue.h | 3 ++- 2 files changed, 12 insertions(+), 11 deletions(-) -- 2.7.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/card/block.c b/drivers/mmc/card/block.c index 56209d32ca5f..eec4986a0175 100644 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c @@ -1153,7 +1153,7 @@ static inline void mmc_blk_reset_success(struct mmc_blk_data *md, int type) int mmc_access_rpmb(struct mmc_queue *mq) { - struct mmc_blk_data *md = mq->data; + struct mmc_blk_data *md = mq->blkdata; /* * If this is a RPMB partition access, return ture */ @@ -1165,7 +1165,7 @@ int mmc_access_rpmb(struct mmc_queue *mq) static int mmc_blk_issue_discard_rq(struct mmc_queue *mq, struct request *req) { - struct mmc_blk_data *md = mq->data; + struct mmc_blk_data *md = mq->blkdata; struct mmc_card *card = md->queue.card; unsigned int from, nr, arg; int err = 0, type = MMC_BLK_DISCARD; @@ -1209,7 +1209,7 @@ static int mmc_blk_issue_discard_rq(struct mmc_queue *mq, struct request *req) static int mmc_blk_issue_secdiscard_rq(struct mmc_queue *mq, struct request *req) { - struct mmc_blk_data *md = mq->data; + struct mmc_blk_data *md = mq->blkdata; struct mmc_card *card = md->queue.card; unsigned int from, nr, arg; int err = 0, type = MMC_BLK_SECDISCARD; @@ -1275,7 +1275,7 @@ static int mmc_blk_issue_secdiscard_rq(struct mmc_queue *mq, static int mmc_blk_issue_flush(struct mmc_queue *mq, struct request *req) { - struct mmc_blk_data *md = mq->data; + struct mmc_blk_data *md = mq->blkdata; struct mmc_card *card = md->queue.card; int ret = 0; @@ -1489,7 +1489,7 @@ static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq, u32 readcmd, writecmd; struct mmc_blk_request *brq = &mqrq->brq; struct request *req = mqrq->req; - struct mmc_blk_data *md = mq->data; + struct mmc_blk_data *md = mq->blkdata; bool do_data_tag; /* @@ -1662,7 +1662,7 @@ static u8 mmc_blk_prep_packed_list(struct mmc_queue *mq, struct request *req) struct request_queue *q = mq->queue; struct mmc_card *card = mq->card; struct request *cur = req, *next = NULL; - struct mmc_blk_data *md = mq->data; + struct mmc_blk_data *md = mq->blkdata; struct mmc_queue_req *mqrq = mq->mqrq_cur; bool en_rel_wr = card->ext_csd.rel_param & EXT_CSD_WR_REL_PARAM_EN; unsigned int req_sectors = 0, phys_segments = 0; @@ -1783,7 +1783,7 @@ static void mmc_blk_packed_hdr_wrq_prep(struct mmc_queue_req *mqrq, struct mmc_blk_request *brq = &mqrq->brq; struct request *req = mqrq->req; struct request *prq; - struct mmc_blk_data *md = mq->data; + struct mmc_blk_data *md = mq->blkdata; struct mmc_packed *packed = mqrq->packed; bool do_rel_wr, do_data_tag; u32 *packed_cmd_hdr; @@ -1954,7 +1954,7 @@ static void mmc_blk_revert_packed_req(struct mmc_queue *mq, static int mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *rqc) { - struct mmc_blk_data *md = mq->data; + struct mmc_blk_data *md = mq->blkdata; struct mmc_card *card = md->queue.card; struct mmc_blk_request *brq = &mq->mqrq_cur->brq; int ret = 1, disable_multi = 0, retry = 0, type, retune_retry_done = 0; @@ -2147,7 +2147,7 @@ static int mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *rqc) int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) { int ret; - struct mmc_blk_data *md = mq->data; + struct mmc_blk_data *md = mq->blkdata; struct mmc_card *card = md->queue.card; struct mmc_host *host = card->host; unsigned long flags; @@ -2265,7 +2265,7 @@ static struct mmc_blk_data *mmc_blk_alloc_req(struct mmc_card *card, if (ret) goto err_putdisk; - md->queue.data = md; + md->queue.blkdata = md; md->disk->major = MMC_BLOCK_MAJOR; md->disk->first_minor = devidx * perdev_minors; diff --git a/drivers/mmc/card/queue.h b/drivers/mmc/card/queue.h index 3c15a75bae86..6ccadf88ef27 100644 --- a/drivers/mmc/card/queue.h +++ b/drivers/mmc/card/queue.h @@ -11,6 +11,7 @@ static inline bool mmc_req_is_special(struct request *req) struct request; struct task_struct; +struct mmc_blk_data; struct mmc_blk_request { struct mmc_request mrq; @@ -57,7 +58,7 @@ struct mmc_queue { unsigned int flags; #define MMC_QUEUE_SUSPENDED (1 << 0) #define MMC_QUEUE_NEW_REQUEST (1 << 1) - void *data; + struct mmc_blk_data *blkdata; struct request_queue *queue; struct mmc_queue_req mqrq[2]; struct mmc_queue_req *mqrq_cur;