From patchwork Tue Nov 15 10:12:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaehoon Chung X-Patchwork-Id: 9429281 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CAAC760756 for ; Tue, 15 Nov 2016 10:12:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B5683286AB for ; Tue, 15 Nov 2016 10:12:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AA25528706; Tue, 15 Nov 2016 10:12:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 611D6286F8 for ; Tue, 15 Nov 2016 10:12:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S941535AbcKOKMw (ORCPT ); Tue, 15 Nov 2016 05:12:52 -0500 Received: from mailout1.samsung.com ([203.254.224.24]:51235 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S941425AbcKOKMu (ORCPT ); Tue, 15 Nov 2016 05:12:50 -0500 Received: from epcpsbgm1new.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OGO00AFZHOSER70@mailout1.samsung.com>; Tue, 15 Nov 2016 19:12:35 +0900 (KST) X-AuditID: cbfee61a-f79916d0000062de-b9-582adf935138 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1new.samsung.com (EPCPMTA) with SMTP id 97.CF.25310.39FDA285; Tue, 15 Nov 2016 19:12:35 +0900 (KST) Received: from localhost.localdomain ([10.113.62.216]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OGO004CZHOYWN60@mmp1.samsung.com>; Tue, 15 Nov 2016 19:12:35 +0900 (KST) From: Jaehoon Chung To: linux-mmc@vger.kernel.org Cc: devicetree@vger.kernel.org, ulf.hansson@linaro.org, heiko@sntech.de, shawn.lin@rock-chips.com, robh+dt@kernel.org, Jaehoon Chung Subject: [PATCHv2 08/10] mmc: dw_mmc: remove the unnecessary mmc_data structure Date: Tue, 15 Nov 2016 19:12:30 +0900 Message-id: <20161115101232.3854-9-jh80.chung@samsung.com> X-Mailer: git-send-email 2.10.1 In-reply-to: <20161115101232.3854-1-jh80.chung@samsung.com> References: <20161115101232.3854-1-jh80.chung@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrALMWRmVeSWpSXmKPExsVy+t9jAd3J97UiDP6vV7SYf+Qcq8X/R69Z LW78amO1OPK/n9Gide8Rdos7T9azWhxfG+7A7rFpVSebx51re9g8/s7az+LRt2UVo8f2a/OY PT5vkgtgi3KzyUhNTEktUkjNS85PycxLt1UKDXHTtVBSyEvMTbVVitD1DQlSUihLzCkF8owM 0ICDc4B7sJK+XYJbxvtLTSwF7zkqrvQLNjAuZe9i5OSQEDCROHNuIguELSZx4d56ti5GLg4h gaWMEof2nmSEcH4wSkz+c4INpIpNQEdi+7fjTCC2iICsxM8/F8DizAILGSVevkgEsYUF/CWu rr4MVsMioCrxdfdkZhCbV8BKYsq8Bqht8hIXrp4CszkFrCWOPzvICGILAdX8etbDOIGRdwEj wypGidSC5ILipPRcw7zUcr3ixNzi0rx0veT83E2M4NB+JrWD8eAu90OMAhyMSjy8gd5aEUKs iWXFlbmHGCU4mJVEeM2vAYV4UxIrq1KL8uOLSnNSiw8xmgIdNpFZSjQ5Hxh3eSXxhibmJubG BhbmlpYmRkrivI2zn4ULCaQnlqRmp6YWpBbB9DFxcEo1MK67c+GZad/j1w7NdRJyL5f5nXry 8/7yLdNPnffTUa/y4FvDEvKZ73T8jl2T1qXy3efYohZU1aKiWLMugKnqwObJx5wnG7zxmrDz zmxO3nc5RufOzAjf+fXK5jmGNxnXPj+dkz076HVhhXjZnI5jCpMeqZav3Li9/cuh7jWfp68v NvhmFn3U+rKAEktxRqKhFnNRcSIAXMLYTYMCAAA= X-MTR: 20000000000000000@CPGS Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Remove the unnecessary mmc_data structure. Instead, cmd->data can be used. Signed-off-by: Jaehoon Chung Tested-by: Heiko Stuebner Reviewed-by: Shawn Lin --- drivers/mmc/host/dw_mmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index e912de6..ec0ba79 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -236,7 +236,6 @@ static void mci_send_cmd(struct dw_mci_slot *slot, u32 cmd, u32 arg); static u32 dw_mci_prepare_command(struct mmc_host *mmc, struct mmc_command *cmd) { - struct mmc_data *data; struct dw_mci_slot *slot = mmc_priv(mmc); struct dw_mci *host = slot->host; u32 cmdr; @@ -291,10 +290,9 @@ static u32 dw_mci_prepare_command(struct mmc_host *mmc, struct mmc_command *cmd) if (cmd->flags & MMC_RSP_CRC) cmdr |= SDMMC_CMD_RESP_CRC; - data = cmd->data; - if (data) { + if (cmd->data) { cmdr |= SDMMC_CMD_DAT_EXP; - if (data->flags & MMC_DATA_WRITE) + if (cmd->data->flags & MMC_DATA_WRITE) cmdr |= SDMMC_CMD_DAT_WR; }