From patchwork Fri Jan 19 14:54:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10175481 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 2062A601E7 for ; Fri, 19 Jan 2018 14:55:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 219612862D for ; Fri, 19 Jan 2018 14:55:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 11E532868D; Fri, 19 Jan 2018 14:55:20 +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 63C402862D for ; Fri, 19 Jan 2018 14:55:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754855AbeASOzR (ORCPT ); Fri, 19 Jan 2018 09:55:17 -0500 Received: from mout.kundenserver.de ([212.227.126.134]:63849 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754232AbeASOzR (ORCPT ); Fri, 19 Jan 2018 09:55:17 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue003 [212.227.15.129]) with ESMTPA (Nemesis) id 0MY20C-1eGfc20YG8-00Unwy; Fri, 19 Jan 2018 15:55:06 +0100 From: Arnd Bergmann To: Wolfram Sang , Ulf Hansson Cc: Arnd Bergmann , Simon Horman , Masahiro Yamada , Geert Uytterhoeven , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] mmc: tmio: hide unused tmio_mmc_clk_disable/tmio_mmc_clk_enable functions Date: Fri, 19 Jan 2018 15:54:44 +0100 Message-Id: <20180119145502.1114288-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:dZcMxTG4a1KByXLdyY1nlb9ys4SDD7nBnQQjovseTglJ28G1rBJ SPGz+m+8O2KN1dmsiC6zcGXHE3+UW2NXUnm2JGrFqMts6gi34r1uqJT2Vjdo4TWxKCEi2MD 7lnv/aw9XU+wSh+sWOXe29whVs8gyWrO5anteaXFJ6mzq46dIkkhj0NUtYiJd8HoguJDnqq n0xTBzue9ShAg1v6K6HZg== X-UI-Out-Filterresults: notjunk:1; V01:K0:8zd/iDEmMy4=:q5a76Cm0OHC8i4aTPdFzBU nKVfUZpSgctzUt4HYSb+O7274sUX2RrDhh3IznCt19cTz9l09GYLDUTDqxKB1L6vaJ5awSOuK 1LvDkxXYZL/ulQ6e9G9EiCVazC0JFD5jJFFSRTkb4jErzFc4qZJCATdCQS6jsQGgopZ7tqFEg GyzlcX1PgSDsTM/8IwJpRKbxQE2hJ3YR0ZcceCj4LGfelVrsYboFinxOlaEt4ayLxnJLBEt+s 1ylXRXedVGMUF524NgWLf+Wmv+1vKgykpsACDCnaSOxDKW5BK4uuSEaZVeX2RdwqlmbSey5Oy hA9FR8Wk3TM8DcMgTje3MlZjSrstj4DlPqCeil1ZDeYo2R9MrrudwvMPBoEg9tUotRB5Prmwc T1AhxErtr7UKwlJVi49U4SjYNXQt698nBg0cB88dPyqMsqYIzxUf59pYh9uT/Po7CYvGFcXq3 ZsmCfcn4BhOzbbktIqDsDPFEkCm3WkzGI4qGuToE5Tgpo852Vb2SnLAqZFomSk/ZbY38G4OK/ nw29xuYURJrwNzzbtIt1peV7YnwsvvUzUoTSwaD/LJtpLXoBsoubdphnwY8t2ZYVP4aG+Sl/e YRiKRuxIiGdRXXRPYOKoEKbMz/sXMSvdUQygGmpO0yOF+rQqLAcqh/LcCSktKz2kKnihpCF8l 2ah8IonrhoqgZ3hfHNQjt7s1q+Bznx4PGcDRL+rU8M51GgbiOvBfsVTugsfYdToxLqK5T+8Q/ JfLs3uttIkwkqmg8H+/nMRvw1NRIt4H5ucP+9Q== 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 When CONFIG_PM is disabled, we get a warning about the clock handling being unused: drivers/mmc/host/tmio_mmc_core.c:937:13: error: 'tmio_mmc_clk_disable' defined but not used [-Werror=unused-function] static void tmio_mmc_clk_disable(struct tmio_mmc_host *host) ^~~~~~~~~~~~~~~~~~~~ drivers/mmc/host/tmio_mmc_core.c:929:12: error: 'tmio_mmc_clk_enable' defined but not used [-Werror=unused-function] static int tmio_mmc_clk_enable(struct tmio_mmc_host *host) ^~~~~~~~~~~~~~~~~~~ As the clock handling is now done elsewhere, this is only used when power management is enabled. We could make the functions as __maybe_unused, but since there is already an #ifdef section, it seems easier to move the helpers closer to their callers. Fixes: b21fc294387e ("mmc: tmio: move clk_enable/disable out of tmio_mmc_host_probe()") Signed-off-by: Arnd Bergmann Reviewed-by: Masahiro Yamada --- drivers/mmc/host/tmio_mmc_core.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/mmc/host/tmio_mmc_core.c b/drivers/mmc/host/tmio_mmc_core.c index 6d8719be75a8..33494241245a 100644 --- a/drivers/mmc/host/tmio_mmc_core.c +++ b/drivers/mmc/host/tmio_mmc_core.c @@ -926,20 +926,6 @@ static void tmio_mmc_done_work(struct work_struct *work) tmio_mmc_finish_request(host); } -static int tmio_mmc_clk_enable(struct tmio_mmc_host *host) -{ - if (!host->clk_enable) - return -ENOTSUPP; - - return host->clk_enable(host); -} - -static void tmio_mmc_clk_disable(struct tmio_mmc_host *host) -{ - if (host->clk_disable) - host->clk_disable(host); -} - static void tmio_mmc_power_on(struct tmio_mmc_host *host, unsigned short vdd) { struct mmc_host *mmc = host->mmc; @@ -1337,6 +1323,20 @@ void tmio_mmc_host_remove(struct tmio_mmc_host *host) EXPORT_SYMBOL_GPL(tmio_mmc_host_remove); #ifdef CONFIG_PM +static int tmio_mmc_clk_enable(struct tmio_mmc_host *host) +{ + if (!host->clk_enable) + return -ENOTSUPP; + + return host->clk_enable(host); +} + +static void tmio_mmc_clk_disable(struct tmio_mmc_host *host) +{ + if (host->clk_disable) + host->clk_disable(host); +} + int tmio_mmc_host_runtime_suspend(struct device *dev) { struct tmio_mmc_host *host = dev_get_drvdata(dev);