From patchwork Wed Jul 31 09:12:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Shen, Jackey" X-Patchwork-Id: 2836185 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 72D5FC0319 for ; Wed, 31 Jul 2013 09:12:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0AEB320259 for ; Wed, 31 Jul 2013 09:12:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AC8A820257 for ; Wed, 31 Jul 2013 09:12:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755886Ab3GaJMg (ORCPT ); Wed, 31 Jul 2013 05:12:36 -0400 Received: from ch1ehsobe004.messaging.microsoft.com ([216.32.181.184]:18031 "EHLO ch1outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755480Ab3GaJMe convert rfc822-to-8bit (ORCPT ); Wed, 31 Jul 2013 05:12:34 -0400 Received: from mail124-ch1-R.bigfish.com (10.43.68.254) by CH1EHSOBE006.bigfish.com (10.43.70.56) with Microsoft SMTP Server id 14.1.225.22; Wed, 31 Jul 2013 09:12:32 +0000 Received: from mail124-ch1 (localhost [127.0.0.1]) by mail124-ch1-R.bigfish.com (Postfix) with ESMTP id A0AE6E00B6; Wed, 31 Jul 2013 09:12:32 +0000 (UTC) X-Forefront-Antispam-Report: CIP:163.181.249.108; KIP:(null); UIP:(null); IPV:NLI; H:ausb3twp01.amd.com; RD:none; EFVD:NLI X-SpamScore: -4 X-BigFish: VPS-4(zz9371I542I4015Idf9Izz1f42h208ch1ee6h1de0h1fdah2073h1202h1e76h1d1ah1d2ah1fc6hzz1de098h8275bh8275dh1de097hz2dh668h839h944hd25hf0ah1220h1288h12a5h12a9h12bdh137ah13b6h1441h14ddh1504h1537h153bh15d0h162dh1631h1758h18e1h1946h19b5h1ad9h1b0ah1d0ch1d2eh1d3fh1dfeh1dffh1e1dh1155h) Received: from mail124-ch1 (localhost.localdomain [127.0.0.1]) by mail124-ch1 (MessageSwitch) id 1375261950723598_31061; Wed, 31 Jul 2013 09:12:30 +0000 (UTC) Received: from CH1EHSMHS025.bigfish.com (snatpool1.int.messaging.microsoft.com [10.43.68.250]) by mail124-ch1.bigfish.com (Postfix) with ESMTP id ABFCC34004A; Wed, 31 Jul 2013 09:12:30 +0000 (UTC) Received: from ausb3twp01.amd.com (163.181.249.108) by CH1EHSMHS025.bigfish.com (10.43.70.25) with Microsoft SMTP Server id 14.16.227.3; Wed, 31 Jul 2013 09:12:28 +0000 X-WSS-ID: 0MQSMWQ-01-1YR-02 X-M-MSG: Received: from sausexedgep01.amd.com (sausexedgep01-ext.amd.com [163.181.249.72]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by ausb3twp01.amd.com (Axway MailGate 3.8.1) with ESMTP id 2C0361028059; Wed, 31 Jul 2013 04:12:25 -0500 (CDT) Received: from SAUSEXDAG03.amd.com (163.181.55.3) by sausexedgep01.amd.com (163.181.36.54) with Microsoft SMTP Server (TLS) id 8.3.192.1; Wed, 31 Jul 2013 04:12:37 -0500 Received: from SCYBEXDAG01.amd.com (10.34.11.11) by sausexdag03.amd.com (163.181.55.3) with Microsoft SMTP Server (TLS) id 14.2.328.9; Wed, 31 Jul 2013 04:12:24 -0500 Received: from SCYBEXDAG04.amd.com ([169.254.4.41]) by SCYBEXDAG01.amd.com ([169.254.1.8]) with mapi id 14.02.0328.009; Wed, 31 Jul 2013 17:12:17 +0800 From: "Shen, Jackey" To: Chris Ball CC: "linux-mmc@vger.kernel.org" , "Shen, Jackey" Subject: RE: [PATCH] mmc: clean up the duplicate code Thread-Topic: [PATCH] mmc: clean up the duplicate code Thread-Index: AQHOUt94h1eKV6DYWUOEEnykJQmJjZl+9VTg Date: Wed, 31 Jul 2013 09:12:17 +0000 Message-ID: <0C8FBB70FF40A94D98BE847F9C171A9803A89B3A@SCYBEXDAG04.amd.com> References: <1368782263-10133-1-git-send-email-jackey.shen@amd.com> In-Reply-To: <1368782263-10133-1-git-send-email-jackey.shen@amd.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.237.74.33] MIME-Version: 1.0 X-OriginatorOrg: amd.com X-FOPE-CONNECTOR: Id%0$Dn%*$RO%0$TLS%0$FQDN%$TlsDn% Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-8.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 Hi Chris, Could you please push into mmc-next if you have no comments? Thanks, Jackey -----Original Message----- From: Jackey Shen [mailto:jackey.shen@amd.com] Sent: Friday, May 17, 2013 5:18 PM To: linux-mmc@vger.kernel.org Cc: Shen, Jackey Subject: [PATCH] mmc: clean up the duplicate code clean up the duplicate micros: mmc_sd_card_uhs -> mmc_card_uhs mmc_sd_card_set_uhs -> mmc_card_set_uhs Signed-off-by: Jackey Shen --- 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 e219c97..820f6fa 100644 --- a/drivers/mmc/core/bus.c +++ b/drivers/mmc/core/bus.c @@ -298,7 +298,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 ad13f42..c979b86 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 f31725b..8ac2079 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h @@ -412,7 +412,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) @@ -424,7 +423,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)