From patchwork Fri Apr 15 17:29:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aisheng Dong X-Patchwork-Id: 8854301 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C795FBF29F for ; Fri, 15 Apr 2016 17:53:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C590920211 for ; Fri, 15 Apr 2016 17:53:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 935022021A for ; Fri, 15 Apr 2016 17:53:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750974AbcDORxE (ORCPT ); Fri, 15 Apr 2016 13:53:04 -0400 Received: from mail-bl2on0096.outbound.protection.outlook.com ([65.55.169.96]:49541 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750910AbcDORxD (ORCPT ); Fri, 15 Apr 2016 13:53:03 -0400 Received: from BY2PR03CA056.namprd03.prod.outlook.com (10.141.249.29) by BN3PR03MB2228.namprd03.prod.outlook.com (10.166.74.13) with Microsoft SMTP Server (TLS) id 15.1.453.26; Fri, 15 Apr 2016 17:37:10 +0000 Received: from BN1AFFO11OLC004.protection.gbl (2a01:111:f400:7c10::113) by BY2PR03CA056.outlook.office365.com (2a01:111:e400:2c5d::29) with Microsoft SMTP Server (TLS) id 15.1.466.19 via Frontend Transport; Fri, 15 Apr 2016 17:37:10 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=nxp.com; gmail.com; dkim=none (message not signed) header.d=none; gmail.com; dmarc=none action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BN1AFFO11OLC004.mail.protection.outlook.com (10.58.53.75) with Microsoft SMTP Server (TLS) id 15.1.453.6 via Frontend Transport; Fri, 15 Apr 2016 17:37:09 +0000 Received: from shlinux2.ap.freescale.net (shlinux2.ap.freescale.net [10.192.224.44]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id u3FHb2HC019919; Fri, 15 Apr 2016 10:37:06 -0700 From: Dong Aisheng To: CC: , , , , , , , Subject: [PATCH 01/23] mmc: sdhci: removed unneeded function wrappers Date: Sat, 16 Apr 2016 01:29:25 +0800 Message-ID: <1460741387-23815-2-git-send-email-aisheng.dong@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1460741387-23815-1-git-send-email-aisheng.dong@nxp.com> References: <1460741387-23815-1-git-send-email-aisheng.dong@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131052154299901370; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.158.2; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(19580395003)(19580405001)(81166005)(2950100001)(77096005)(33646002)(87936001)(229853001)(85426001)(2906002)(92566002)(106466001)(105606002)(36756003)(2351001)(5008740100001)(104016004)(6806005)(189998001)(586003)(110136002)(47776003)(1096002)(1220700001)(86362001)(48376002)(50226001)(4326007)(50466002)(76176999)(5003940100001)(50986999)(11100500001)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR03MB2228; H:az84smr01.freescale.net; FPR:; SPF:Fail; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11OLC004; 1:B7qR1MGziLUocEmxi8q6sLIYxvIbt7Eohub/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H6+mJ12Sv5JFWXjWeEStY1nLRIT6XYH8meEn2wFbt5jjvMlAOUM8Him3tBdNE=; 25:HdYcKxCoUzDNCHbs+lzR1RC3wa13w4KtVoZFNOzxY5SakFJY86H7qUplO75MMP5/1Brmh05gPmygGWoQsh7nqPxe1cCLImIz8NufTEXFsaiFTnC9xR1O0M1XFwE9o7VQURF+S8zheKAkjLXdLlYAiuk/kGb6AfzJQpGjsq6NbW6+z70UkRTvjn6qweMYZjJ3f6ky95FM3BAaMFaa7zLjwooOWVxxUSoGIH8ZqwzKAxGVjraLOTVXL1DssH8QDWV863lf/TnXuOamu1hznFHykEyt6OSyGAYAVyqXJad/bU9fMKhHHREMgih/A4dnzCmwDywKI4LnUN6geWbPIGjl1Q== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR03MB2228; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(13023025)(5005006)(13018025)(13017025)(13024025)(13015025)(3002001)(10201501046)(6055026); SRVR:BN3PR03MB2228; BCL:0; PCL:0; RULEID:(400006); SRVR:BN3PR03MB2228; X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2228; 4:XUps6ZrsN8wXQRzyXE2TdoWctPEmFtHFuuea1R88AoGzw4TcsXspAKtqb6OoBiG93Kb3DjnTgyhCFavRtmHLCqM0UFMxCoBnJEWDK2oZzPLU8rDmQ2FJCvKZPMzFjVVRR5tEZsRV2IGBIWkNdHU+JZZWSgzA4hhp1OYWQVwRhALPqDa/vYVYpX+HkzdHPXCThlwQ/3GD9ARJpKwIOSdzBATCSRAcq3OUbrMierRCLCNWQOPhQC3NbzvvhBBzX0LWLDRE2ye6ZjvnUi2V+8Ojd6lAF3XzyULRKi2lg+xTbaI4bg+Rtsfe2UZvJk4OQ0UUKW1oymrKOBzikGrFfHQvcegT416VgCCB7pwtRTfmksIKPBzJjwllkPau5EwQY3t4XDKEvkxXosOFC78VJWuoi/p9hRxJSBKlUBB01hIcVeHtgsk4tPKKsqvhoQt/EZklaq6K8+vkBNFEfP2csG2TKnL3hS2wpc1H0/oG/zDvMS4= X-Forefront-PRVS: 0913EA1D60 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR03MB2228; 23:x+AZz/XUOWO0htjwNmKEDKSPRmNF1LAf4sVKGrKh4?= =?us-ascii?Q?Dn3nGjIg6P4w32UFIOZZXt6ni0qjzeJ5ZPVF66UBTMYiAT2CrI5deoDAxLVh?= =?us-ascii?Q?VKK9JKivLKTMeng9a58cPzkfdVZEDRDTr727Cl0DU871Xmn4vW1Bt3plDtM7?= =?us-ascii?Q?w5CtAjGSf+EbLGvb+Tp1NY7YQWtGANmN8vj5OUm0ZTLmWHbRHicOUE232CwB?= =?us-ascii?Q?aJhOB+tUT1e5u2eNeGMn0+/itKjtgpJmVAvv7W0vu4UIF1KXJ2prCF9fwTyR?= =?us-ascii?Q?eFsrcye1mNIbNW9wQMwb87pT8uqHRa5cA/+l1xV5Wksw+lJL1q0574uwM1na?= =?us-ascii?Q?cl49hYYlfmYf2M0fk5FJcRneSXz18MWORnDHCRfZtmcyZPt0qIjuZmpaoPs+?= =?us-ascii?Q?J0LRv/n/inTOzLhW68HC5DR1LazWYpjk3eHI/cvrxniLXUO11jb1HYUTJjK0?= =?us-ascii?Q?ieEq+L1vB3k4eRJTkybWbhnD/GeoxKCqJ0qLqg6HNaNUT/ltqkPrItugvhzt?= =?us-ascii?Q?rXdPgb71v0h1vd1Pyf3WF+x7XbL8NEy2rfmLrk3FGNWJE/Wv5ffKWk+RtvSd?= =?us-ascii?Q?509K11D8d4VGtr81auMdgk/MzfeNqZvgN+L0GxIxS2cyUPgY+xCJo0CpW8Ln?= =?us-ascii?Q?DQMzOLHU5h7pDL20arCpqyvvn7Pyb/049MQn/DihHxRVSS49MAMOOv7q83ns?= =?us-ascii?Q?+VsgOjsLU4cdlssp2JPibTaHTj+n8L7YeQHTubsW5nU2ynxM+dw/QGkGRN3R?= =?us-ascii?Q?KQv/KZyu0P8ywri65+tmHW+NHHT8Yjojl3mmEW3/6jmwAyeChjhxSqSTaFU3?= =?us-ascii?Q?Yxudvab3h5nSI4UuLuJQbM5UGnABYNNa+LlhRC1IGlPnUU5OyYPHA83hzHbj?= =?us-ascii?Q?zBSVsJC2YRh+bHJPEe4Nlo5dv1Zs093Vrj4AH9ccOLzllUlx4m3BMDwO1LJL?= =?us-ascii?Q?0S1d5UtzJRpDXuZdSX3Flw0+BTnTc0JPxI99aFcQVcTybvXg+BeDng9Z0oE1?= =?us-ascii?Q?/VWQnIEJlrKOY5ZWxgM/ZkHBMUO0OWX4Bx7q3Re33x0JwbLNObLtkHMBQKqX?= =?us-ascii?Q?Vaed4U=3D?= X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2228; 5:+3zsxa78CMBIBAqS6lGmRkCsiNXdnoSQSMihzRky6cgT5B9Fcpps2fjiQAAmaAZjUbfVQApabQX7ZJOor8lIqvGCLjvcr4zXMQxBWyr5KRyth1HyUYGd0qt+21x4SwhH7ZnSg1d+5EviMi/bFIenBLUpEeqVPnWMXNeL9wzXpok=; 24:m13zVoDX26f/sSkS1GTVhBgueeJOZWoS5lPEUHkEuSWD6upUgdXf+TIzftpNlbSkpnKNHBbeF+De3199sjtCj9h5Z41z14AK340Yvb67vfU= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2016 17:37:09.7561 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR03MB2228 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.9 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 After commit d6463f170cf0 ("mmc: sdhci: Remove redundant runtime PM calls"), some of original sdhci_do_xx() function wrappers becomes meaningless, so remove them. Signed-off-by: Dong Aisheng Acked-by: Adrian Hunter --- drivers/mmc/host/sdhci.c | 60 ++++++++++++------------------------------------ 1 file changed, 15 insertions(+), 45 deletions(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 8e74e75..be52a3a 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -53,7 +53,7 @@ static void sdhci_finish_data(struct sdhci_host *); static void sdhci_finish_command(struct sdhci_host *); static int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode); static void sdhci_enable_preset_value(struct sdhci_host *host, bool enable); -static int sdhci_do_get_cd(struct sdhci_host *host); +static int sdhci_get_cd(struct mmc_host *mmc); #ifdef CONFIG_PM static void sdhci_runtime_pm_bus_on(struct sdhci_host *host); @@ -194,7 +194,7 @@ EXPORT_SYMBOL_GPL(sdhci_reset); static void sdhci_do_reset(struct sdhci_host *host, u8 mask) { if (host->quirks & SDHCI_QUIRK_NO_CARD_NO_RESET) { - if (!sdhci_do_get_cd(host)) + if (!sdhci_get_cd(host->mmc)) return; } @@ -1393,11 +1393,11 @@ void sdhci_set_uhs_signaling(struct sdhci_host *host, unsigned timing) } EXPORT_SYMBOL_GPL(sdhci_set_uhs_signaling); -static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios) +static void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) { + struct sdhci_host *host = mmc_priv(mmc); unsigned long flags; u8 ctrl; - struct mmc_host *mmc = host->mmc; spin_lock_irqsave(&host->lock, flags); @@ -1551,16 +1551,10 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios) spin_unlock_irqrestore(&host->lock, flags); } -static void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) +static int sdhci_get_cd(struct mmc_host *mmc) { struct sdhci_host *host = mmc_priv(mmc); - - sdhci_do_set_ios(host, ios); -} - -static int sdhci_do_get_cd(struct sdhci_host *host) -{ - int gpio_cd = mmc_gpio_get_cd(host->mmc); + int gpio_cd = mmc_gpio_get_cd(mmc); if (host->flags & SDHCI_DEVICE_DEAD) return 0; @@ -1584,13 +1578,6 @@ static int sdhci_do_get_cd(struct sdhci_host *host) return !!(sdhci_readl(host, SDHCI_PRESENT_STATE) & SDHCI_CARD_PRESENT); } -static int sdhci_get_cd(struct mmc_host *mmc) -{ - struct sdhci_host *host = mmc_priv(mmc); - - return sdhci_do_get_cd(host); -} - static int sdhci_check_ro(struct sdhci_host *host) { unsigned long flags; @@ -1615,8 +1602,9 @@ static int sdhci_check_ro(struct sdhci_host *host) #define SAMPLE_COUNT 5 -static int sdhci_do_get_ro(struct sdhci_host *host) +static int sdhci_get_ro(struct mmc_host *mmc) { + struct sdhci_host *host = mmc_priv(mmc); int i, ro_count; if (!(host->quirks & SDHCI_QUIRK_UNSTABLE_RO_DETECT)) @@ -1641,13 +1629,6 @@ static void sdhci_hw_reset(struct mmc_host *mmc) host->ops->hw_reset(host); } -static int sdhci_get_ro(struct mmc_host *mmc) -{ - struct sdhci_host *host = mmc_priv(mmc); - - return sdhci_do_get_ro(host); -} - static void sdhci_enable_sdio_irq_nolock(struct sdhci_host *host, int enable) { if (!(host->flags & SDHCI_DEVICE_DEAD)) { @@ -1677,10 +1658,10 @@ static void sdhci_enable_sdio_irq(struct mmc_host *mmc, int enable) spin_unlock_irqrestore(&host->lock, flags); } -static int sdhci_do_start_signal_voltage_switch(struct sdhci_host *host, - struct mmc_ios *ios) +static int sdhci_start_signal_voltage_switch(struct mmc_host *mmc, + struct mmc_ios *ios) { - struct mmc_host *mmc = host->mmc; + struct sdhci_host *host = mmc_priv(mmc); u16 ctrl; int ret; @@ -1768,17 +1749,6 @@ static int sdhci_do_start_signal_voltage_switch(struct sdhci_host *host, } } -static int sdhci_start_signal_voltage_switch(struct mmc_host *mmc, - struct mmc_ios *ios) -{ - struct sdhci_host *host = mmc_priv(mmc); - - if (host->version < SDHCI_SPEC_300) - return 0; - - return sdhci_do_start_signal_voltage_switch(host, ios); -} - static int sdhci_card_busy(struct mmc_host *mmc) { struct sdhci_host *host = mmc_priv(mmc); @@ -2070,7 +2040,7 @@ static void sdhci_card_event(struct mmc_host *mmc) if (host->ops->card_event) host->ops->card_event(host); - present = sdhci_do_get_cd(host); + present = sdhci_get_cd(host->mmc); spin_lock_irqsave(&host->lock, flags); @@ -2643,7 +2613,7 @@ int sdhci_resume_host(struct sdhci_host *host) sdhci_init(host, 0); host->pwr = 0; host->clock = 0; - sdhci_do_set_ios(host, &host->mmc->ios); + sdhci_set_ios(host->mmc, &host->mmc->ios); } else { sdhci_init(host, (host->mmc->pm_flags & MMC_PM_KEEP_POWER)); mmiowb(); @@ -2721,8 +2691,8 @@ int sdhci_runtime_resume_host(struct sdhci_host *host) /* Force clock and power re-program */ host->pwr = 0; host->clock = 0; - sdhci_do_start_signal_voltage_switch(host, &host->mmc->ios); - sdhci_do_set_ios(host, &host->mmc->ios); + sdhci_start_signal_voltage_switch(host->mmc, &host->mmc->ios); + sdhci_set_ios(host->mmc, &host->mmc->ios); if ((host_flags & SDHCI_PV_ENABLED) && !(host->quirks2 & SDHCI_QUIRK2_PRESET_VALUE_BROKEN)) {