From patchwork Thu Nov 17 07:40:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaehoon Chung X-Patchwork-Id: 9433587 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 3018F60238 for ; Thu, 17 Nov 2016 07:41:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 21BC8292B0 for ; Thu, 17 Nov 2016 07:41:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 16BDD292B4; Thu, 17 Nov 2016 07:41:04 +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 BAB8F292B0 for ; Thu, 17 Nov 2016 07:41:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752418AbcKQHlC (ORCPT ); Thu, 17 Nov 2016 02:41:02 -0500 Received: from mailout3.samsung.com ([203.254.224.33]:53472 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752204AbcKQHlB (ORCPT ); Thu, 17 Nov 2016 02:41:01 -0500 Received: from epcpsbgm2new.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OGR0271EZZVAM70@mailout3.samsung.com> for linux-mmc@vger.kernel.org; Thu, 17 Nov 2016 16:40:43 +0900 (KST) X-AuditID: cbfee61b-f796f6d000004092-b8-582d5efbf6d8 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2new.samsung.com (EPCPMTA) with SMTP id 23.93.16530.BFE5D285; Thu, 17 Nov 2016 16:40:43 +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 <0OGR00EHCZZUI940@mmp1.samsung.com>; Thu, 17 Nov 2016 16:40:42 +0900 (KST) From: Jaehoon Chung To: linux-mmc@vger.kernel.org Cc: ulf.hansson@linaro.org, shawn.lin@rock-chips.com, adrian.hunter@intel.com, Jaehoon Chung Subject: [PATCHv3 7/9] mmc: dw_mmc: remove the unnecessary mmc_data structure Date: Thu, 17 Nov 2016 16:40:39 +0900 Message-id: <20161117074041.8641-8-jh80.chung@samsung.com> X-Mailer: git-send-email 2.10.1 In-reply-to: <20161117074041.8641-1-jh80.chung@samsung.com> References: <20161117074041.8641-1-jh80.chung@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrALMWRmVeSWpSXmKPExsVy+t9jAd3fcboRBtuX8lqcfLKGzeLGrzZW iyP/+xkt7jxZz2pxfG24A6vH4j0vmTzuXNvD5vF31n4Wj74tqxg9Pm+SC2CNcrPJSE1MSS1S SM1Lzk/JzEu3VQoNcdO1UFLIS8xNtVWK0PUNCVJSKEvMKQXyjAzQgINzgHuwkr5dglvGpa7p TAWLOCs6lqg1MF5m72Lk5JAQMJFY9vMplC0mceHeerYuRi4OIYGljBI73rxjhHB+MErs3LgY rIpNQEdi+7fjTCC2iICsxM8/F9hAbGaBcolVX06ygtjCAr4SW9bNYASxWQRUJTrmXgCzeQWs JF7c+Au1TV7iwtVTLF2MHBycAtYSPb8UQMJCQCWnz31jm8DIu4CRYRWjRGpBckFxUnquUV5q uV5xYm5xaV66XnJ+7iZGcOg+k97BeHiX+yFGAQ5GJR7eDzN1IoRYE8uKK3MPMUpwMCuJ8IoE 6UYI8aYkVlalFuXHF5XmpBYfYjQFumsis5Rocj4wrvJK4g1NzE3MjQ0szC0tTYyUxHkbZz8L FxJITyxJzU5NLUgtgulj4uCUamBc7KKueyno+b7Fu6auC3x2oe5I04xUy//Tjz7wspsy7/D2 cu3E/UUz9tf4W3XsE9tiv3fPrbOb2ereTl2Y8WD3rHrXmJwvG1w325kd+h9YuaVz+oKbEQu2 8dn6Plu5dNbCuftvlHS1ie/mXxTy9mfOxZc7pcq21ctIx0+8xHApS9w/ndNoyQXuLiWW4oxE Qy3mouJEACzR2NZzAgAA 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 d2fae00..40afb45 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; }