From patchwork Fri May 17 09:17:43 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Shen, Jackey" X-Patchwork-Id: 2581621 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 73B6A3FD4E for ; Fri, 17 May 2013 09:18:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752827Ab3EQJS0 (ORCPT ); Fri, 17 May 2013 05:18:26 -0400 Received: from tx2ehsobe003.messaging.microsoft.com ([65.55.88.13]:28518 "EHLO tx2outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752647Ab3EQJSZ (ORCPT ); Fri, 17 May 2013 05:18:25 -0400 Received: from mail112-tx2-R.bigfish.com (10.9.14.253) by TX2EHSOBE009.bigfish.com (10.9.40.29) with Microsoft SMTP Server id 14.1.225.23; Fri, 17 May 2013 09:18:24 +0000 Received: from mail112-tx2 (localhost [127.0.0.1]) by mail112-tx2-R.bigfish.com (Postfix) with ESMTP id 908F7120159 for ; Fri, 17 May 2013 09:18:24 +0000 (UTC) X-Forefront-Antispam-Report: CIP:163.181.249.109; KIP:(null); UIP:(null); IPV:NLI; H:ausb3twp02.amd.com; RD:none; EFVD:NLI X-SpamScore: 0 X-BigFish: VPS0(zzzz1f42h1ee6h1de0h1fdah1202h1e76h1d1ah1d2ah1fc6hzz8275bhz2dh668h839hd24he5bhf0ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h1504h1537h162dh1631h1758h1898h18e1h1946h19b5h1ad9h1b0ah1d0ch1d2eh1d3fh1155h) Received: from mail112-tx2 (localhost.localdomain [127.0.0.1]) by mail112-tx2 (MessageSwitch) id 1368782302586378_27366; Fri, 17 May 2013 09:18:22 +0000 (UTC) Received: from TX2EHSMHS034.bigfish.com (unknown [10.9.14.233]) by mail112-tx2.bigfish.com (Postfix) with ESMTP id 813E9320058 for ; Fri, 17 May 2013 09:18:22 +0000 (UTC) Received: from ausb3twp02.amd.com (163.181.249.109) by TX2EHSMHS034.bigfish.com (10.9.99.134) with Microsoft SMTP Server id 14.1.225.23; Fri, 17 May 2013 09:18:22 +0000 X-WSS-ID: 0MMXR6J-02-0X1-02 X-M-MSG: Received: from sausexedgep02.amd.com (sausexedgep02-ext.amd.com [163.181.249.73]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by ausb3twp02.amd.com (Axway MailGate 3.8.1) with ESMTP id 2B1C6C801A for ; Fri, 17 May 2013 04:18:19 -0500 (CDT) Received: from SAUSEXDAG03.amd.com (163.181.55.3) by sausexedgep02.amd.com (163.181.36.59) with Microsoft SMTP Server (TLS) id 8.3.192.1; Fri, 17 May 2013 04:18:13 -0500 Received: from SCYBEXDAG03.amd.com (10.34.11.13) by sausexdag03.amd.com (163.181.55.3) with Microsoft SMTP Server (TLS) id 14.2.328.9; Fri, 17 May 2013 04:18:20 -0500 Received: from ubuntu.amd.com (10.237.74.109) by SCYBEXDAG03.amd.com (10.34.11.13) with Microsoft SMTP Server id 14.2.328.9; Fri, 17 May 2013 17:18:18 +0800 From: Jackey Shen To: CC: Jackey Shen Subject: [PATCH] mmc: clean up the duplicate code Date: Fri, 17 May 2013 17:17:43 +0800 Message-ID: <1368782263-10133-1-git-send-email-jackey.shen@amd.com> X-Mailer: git-send-email 1.7.10.4 MIME-Version: 1.0 X-OriginatorOrg: amd.com Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org 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)