From patchwork Tue Sep 10 05:44:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaehoon Chung X-Patchwork-Id: 2864171 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6D9459F495 for ; Tue, 10 Sep 2013 05:44:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 92DBC20348 for ; Tue, 10 Sep 2013 05:44:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2158820342 for ; Tue, 10 Sep 2013 05:44:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754178Ab3IJFn6 (ORCPT ); Tue, 10 Sep 2013 01:43:58 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:8270 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753454Ab3IJFn4 (ORCPT ); Tue, 10 Sep 2013 01:43:56 -0400 Received: from epcpsbgr4.samsung.com (u144.gpu120.samsung.co.kr [203.254.230.144]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MSW00M6LAL66QM0@mailout3.samsung.com> for linux-mmc@vger.kernel.org; Tue, 10 Sep 2013 14:43:54 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.112]) by epcpsbgr4.samsung.com (EPCPMTA) with SMTP id 37.56.31253.A91BE225; Tue, 10 Sep 2013 14:43:54 +0900 (KST) X-AuditID: cbfee690-b7f3b6d000007a15-d9-522eb19a36ea Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 6F.46.09055.A91BE225; Tue, 10 Sep 2013 14:43:54 +0900 (KST) Received: from [10.252.81.186] by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MSW00MIXAL6W240@mmp1.samsung.com>; Tue, 10 Sep 2013 14:43:54 +0900 (KST) Message-id: <522EB1B3.6020402@samsung.com> Date: Tue, 10 Sep 2013 14:44:19 +0900 From: Jaehoon Chung User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130803 Thunderbird/17.0.8 MIME-version: 1.0 To: "linux-mmc@vger.kernel.org" Cc: 'Chris Ball' , Ulf Hansson , Seungwon Jeon , 'Konstantin Dorfman' , Wei WANG Subject: [RFC PATCH] mmc: core: remove the mmc_sd_card_uhs() Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrKIsWRmVeSWpSXmKPExsWyRsSkQHfWRr0ggxOLtCy2v97IZrHzzCM2 iyP/+xktPty/yGxxfG24xcp1p9kc2Dwu9/UyeRy6spbR4861PWwePza8Y/To27KK0ePzJrkA tigum5TUnMyy1CJ9uwSujPaeS4wFrWIVp/d2sDYwfhTqYuTkkBAwkVjXNI0ZwhaTuHBvPVsX IxeHkMBSRompFy8xdjFygBX9bNSDiC9ilHh65RwThPOaUeL77KtMIN28AloSr9b1s4PYLAKq Eqv/94DF2QR0JLZ/Ow5miwqESbx4tYsZol5Q4sfkeywgC0QErCWaf8uCzGQWOM4o8WBOE1i9 sICNxKsv3YwgNjPQnP2t09ggbHmJzWveMoM0SAhsY5fYuv0wK8RiAYlvkw+xQFwtK7HpANRn khIHV9xgmcAoMgvJ6llIxs5CMnYBI/MqRtHUguSC4qT0IhO94sTc4tK8dL3k/NxNjMAoOv3v 2YQdjPcOWB9iTAZaOZFZSjQ5HxiFeSXxhsZmRhamJqbGRuaWZqQJK4nzqrdYBwoJpCeWpGan phak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Kcuuy3BNPtWzb/VN0WCRVBUr JZbijERDLeai4kQAUYXJTRUDAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP mmc_sd_card_uhs() didn't has difference with mmc_card_uhs(). And mmc_sd_card_set_uhs() didn't use anywhere. I'm not sure why mmc_sd_card_uhs() used. If need to check whether card is sd or not, then we can use the mmc_card_sd(). Signed-off-by: Jaehoon Chung --- drivers/mmc/core/bus.c | 2 +- drivers/mmc/host/rtsx_pci_sdmmc.c | 2 +- include/linux/mmc/card.h | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c index 704bf66..cdca8a7 100644 --- a/drivers/mmc/core/bus.c +++ b/drivers/mmc/core/bus.c @@ -340,7 +340,7 @@ int mmc_add_card(struct mmc_card *card) break; } - if (mmc_sd_card_uhs(card) && + if (mmc_card_uhs(card) && (card->sd_bus_speed < ARRAY_SIZE(uhs_speeds))) uhs_bus_speed_mode = uhs_speeds[card->sd_bus_speed]; diff --git a/drivers/mmc/host/rtsx_pci_sdmmc.c b/drivers/mmc/host/rtsx_pci_sdmmc.c index 82a35b9..b6964a1 100644 --- a/drivers/mmc/host/rtsx_pci_sdmmc.c +++ b/drivers/mmc/host/rtsx_pci_sdmmc.c @@ -359,7 +359,7 @@ static int sd_rw_multi(struct realtek_pci_sdmmc *host, struct mmc_request *mrq) struct mmc_host *mmc = host->mmc; struct mmc_card *card = mmc->card; struct mmc_data *data = mrq->data; - int uhs = mmc_sd_card_uhs(card); + int uhs = mmc_card_uhs(card); int read = (data->flags & MMC_DATA_READ) ? 1 : 0; u8 cfg2, trans_mode; int err; diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index 842de3e..f42cdbd 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h @@ -420,7 +420,6 @@ static inline void __maybe_unused remove_quirk(struct mmc_card *card, int data) #define mmc_card_blockaddr(c) ((c)->state & MMC_STATE_BLOCKADDR) #define mmc_card_ddr_mode(c) ((c)->state & MMC_STATE_HIGHSPEED_DDR) #define mmc_card_uhs(c) ((c)->state & MMC_STATE_ULTRAHIGHSPEED) -#define mmc_sd_card_uhs(c) ((c)->state & MMC_STATE_ULTRAHIGHSPEED) #define mmc_card_ext_capacity(c) ((c)->state & MMC_CARD_SDXC) #define mmc_card_removed(c) ((c) && ((c)->state & MMC_CARD_REMOVED)) #define mmc_card_doing_bkops(c) ((c)->state & MMC_STATE_DOING_BKOPS) @@ -432,7 +431,6 @@ static inline void __maybe_unused remove_quirk(struct mmc_card *card, int data) #define mmc_card_set_blockaddr(c) ((c)->state |= MMC_STATE_BLOCKADDR) #define mmc_card_set_ddr_mode(c) ((c)->state |= MMC_STATE_HIGHSPEED_DDR) #define mmc_card_set_uhs(c) ((c)->state |= MMC_STATE_ULTRAHIGHSPEED) -#define mmc_sd_card_set_uhs(c) ((c)->state |= MMC_STATE_ULTRAHIGHSPEED) #define mmc_card_set_ext_capacity(c) ((c)->state |= MMC_CARD_SDXC) #define mmc_card_set_removed(c) ((c)->state |= MMC_CARD_REMOVED) #define mmc_card_set_doing_bkops(c) ((c)->state |= MMC_STATE_DOING_BKOPS)