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: 125172 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp326871ljf; Fri, 19 Jan 2018 06:55:19 -0800 (PST) X-Google-Smtp-Source: ACJfBotmNd4s7ix18gMiCiSgqUobNvdicRJKjpmtJEVEtpYZj6CD5blQb198YYGbihUUEFckg4ha X-Received: by 10.98.91.193 with SMTP id p184mr46804707pfb.16.1516373719355; Fri, 19 Jan 2018 06:55:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516373719; cv=none; d=google.com; s=arc-20160816; b=HECrgVb0RrfiPuXxD0l6o3BMIh3ROLcjw3MjP5Uou4RiF6M3Y6LnIUI5uQ/S1OAIia 8VsphFx9lckp8BfhCYb0q7jerPTHPEjUM4urS3sTG4h+EvznreYH4w71/CL9W2Q7v2WA Cvi5x4kfTIBrh4OYG9I1syCorAEzUhA2AJFDGRm3nNDRZBqiU5FuuEFg612m9jJOsOVb ZUCxWuxB0v9jbxGPzAwG4DuRb19Qo1u12NLN6gqoxK5ntDIARIGrJ2BnYbb/G5Lnk13U l6AfXPE1igrDVV4rOGhxBaeQq0/6KbWccKdzp+FO/PyZu7l2d63CLymJnxwmzVGAIDJH sAiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=liPntzGzcpJqnonO2ej0k61ehcn/cwGC9LRzE1YMyYg=; b=lknfRwWjl2ymAn2HdsSqvPuN4wssnQ9Tk2WIcClaq2vNIyRFeYxqrrAgMJiDF04xjm Rx1BTTjqpYtRyiTY2xDJO4yVGm+2p3TVBwBq3NN0I1BD2ycSvfHqqzJMe3865/YcEJZb ycuZIgZRgABFAktzy20yDR5IT7nZ/j8PgInVDTHc7Szn4LeY0dlK7zSnJpRJtffjQBAW dxEuIpLY40cDPWjf/bysSASL8vKxOoNKUS4LcSimSzaFQ61knS+p3XPzcYmLXXGGdVbx j0hWJ81N2knEG9DFeZDHQRGwtV2Im0aicmNqFuSS5qO89p5xXzYgve0mdgGxUGb1Yb3Q Bt5Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h13si8081209pgq.776.2018.01.19.06.55.19; Fri, 19 Jan 2018 06:55:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754855AbeASOzR (ORCPT + 6 others); 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 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 --- drivers/mmc/host/tmio_mmc_core.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) -- 2.9.0 -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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);