* [PATCH] mmc: sdhci-msm: avoid unused function warning
@ 2018-12-10 20:45 Arnd Bergmann
2018-12-11 7:33 ` Adrian Hunter
2018-12-11 9:31 ` Ulf Hansson
0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2018-12-10 20:45 UTC (permalink / raw)
To: Adrian Hunter, Ulf Hansson
Cc: Arnd Bergmann, Vijay Viswanath, Evan Green, Sayali Lokhande,
Veerabhadrarao Badiganti, weiyongjun (A),
Loic Poulain, linux-mmc, linux-kernel
The newly added sdhci_msm_restore_sdr_dll_config() function is only
called if CONFIG_PM is enabled:
drivers/mmc/host/sdhci-msm.c:1050:12: error: 'sdhci_msm_restore_sdr_dll_config' defined but not used [-Werror=unused-function]
Better remove the incorrect #ifdef altogether and just use __maybe_unused,
which is harder to get wrong.
Fixes: ec3349733550 ("mmc: sdhci-msm: Re-initialize DLL if MCLK is gated dynamically")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/mmc/host/sdhci-msm.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c
index 5497a71abe07..d6c9ebd8d263 100644
--- a/drivers/mmc/host/sdhci-msm.c
+++ b/drivers/mmc/host/sdhci-msm.c
@@ -1997,8 +1997,7 @@ static int sdhci_msm_remove(struct platform_device *pdev)
return 0;
}
-#ifdef CONFIG_PM
-static int sdhci_msm_runtime_suspend(struct device *dev)
+static __maybe_unused int sdhci_msm_runtime_suspend(struct device *dev)
{
struct sdhci_host *host = dev_get_drvdata(dev);
struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
@@ -2010,7 +2009,7 @@ static int sdhci_msm_runtime_suspend(struct device *dev)
return 0;
}
-static int sdhci_msm_runtime_resume(struct device *dev)
+static __maybe_unused int sdhci_msm_runtime_resume(struct device *dev)
{
struct sdhci_host *host = dev_get_drvdata(dev);
struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
@@ -2030,7 +2029,6 @@ static int sdhci_msm_runtime_resume(struct device *dev)
return 0;
}
-#endif
static const struct dev_pm_ops sdhci_msm_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
--
2.20.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mmc: sdhci-msm: avoid unused function warning
2018-12-10 20:45 [PATCH] mmc: sdhci-msm: avoid unused function warning Arnd Bergmann
@ 2018-12-11 7:33 ` Adrian Hunter
2018-12-11 9:31 ` Ulf Hansson
1 sibling, 0 replies; 3+ messages in thread
From: Adrian Hunter @ 2018-12-11 7:33 UTC (permalink / raw)
To: Arnd Bergmann, Ulf Hansson
Cc: Vijay Viswanath, Evan Green, Sayali Lokhande,
Veerabhadrarao Badiganti, weiyongjun (A),
Loic Poulain, linux-mmc, linux-kernel
On 10/12/18 10:45 PM, Arnd Bergmann wrote:
> The newly added sdhci_msm_restore_sdr_dll_config() function is only
> called if CONFIG_PM is enabled:
>
> drivers/mmc/host/sdhci-msm.c:1050:12: error: 'sdhci_msm_restore_sdr_dll_config' defined but not used [-Werror=unused-function]
>
> Better remove the incorrect #ifdef altogether and just use __maybe_unused,
> which is harder to get wrong.
>
> Fixes: ec3349733550 ("mmc: sdhci-msm: Re-initialize DLL if MCLK is gated dynamically")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
> ---
> drivers/mmc/host/sdhci-msm.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c
> index 5497a71abe07..d6c9ebd8d263 100644
> --- a/drivers/mmc/host/sdhci-msm.c
> +++ b/drivers/mmc/host/sdhci-msm.c
> @@ -1997,8 +1997,7 @@ static int sdhci_msm_remove(struct platform_device *pdev)
> return 0;
> }
>
> -#ifdef CONFIG_PM
> -static int sdhci_msm_runtime_suspend(struct device *dev)
> +static __maybe_unused int sdhci_msm_runtime_suspend(struct device *dev)
> {
> struct sdhci_host *host = dev_get_drvdata(dev);
> struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
> @@ -2010,7 +2009,7 @@ static int sdhci_msm_runtime_suspend(struct device *dev)
> return 0;
> }
>
> -static int sdhci_msm_runtime_resume(struct device *dev)
> +static __maybe_unused int sdhci_msm_runtime_resume(struct device *dev)
> {
> struct sdhci_host *host = dev_get_drvdata(dev);
> struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
> @@ -2030,7 +2029,6 @@ static int sdhci_msm_runtime_resume(struct device *dev)
>
> return 0;
> }
> -#endif
>
> static const struct dev_pm_ops sdhci_msm_pm_ops = {
> SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mmc: sdhci-msm: avoid unused function warning
2018-12-10 20:45 [PATCH] mmc: sdhci-msm: avoid unused function warning Arnd Bergmann
2018-12-11 7:33 ` Adrian Hunter
@ 2018-12-11 9:31 ` Ulf Hansson
1 sibling, 0 replies; 3+ messages in thread
From: Ulf Hansson @ 2018-12-11 9:31 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Adrian Hunter, Vijay Viswanath, Evan Green, Sayali Lokhande,
Veerabhadrarao Badiganti, Wei Yongjun, Loic Poulain, linux-mmc,
Linux Kernel Mailing List
On Mon, 10 Dec 2018 at 21:45, Arnd Bergmann <arnd@arndb.de> wrote:
>
> The newly added sdhci_msm_restore_sdr_dll_config() function is only
> called if CONFIG_PM is enabled:
>
> drivers/mmc/host/sdhci-msm.c:1050:12: error: 'sdhci_msm_restore_sdr_dll_config' defined but not used [-Werror=unused-function]
>
> Better remove the incorrect #ifdef altogether and just use __maybe_unused,
> which is harder to get wrong.
>
> Fixes: ec3349733550 ("mmc: sdhci-msm: Re-initialize DLL if MCLK is gated dynamically")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Applied for next, thanks!
Kind regards
Uffe
> ---
> drivers/mmc/host/sdhci-msm.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c
> index 5497a71abe07..d6c9ebd8d263 100644
> --- a/drivers/mmc/host/sdhci-msm.c
> +++ b/drivers/mmc/host/sdhci-msm.c
> @@ -1997,8 +1997,7 @@ static int sdhci_msm_remove(struct platform_device *pdev)
> return 0;
> }
>
> -#ifdef CONFIG_PM
> -static int sdhci_msm_runtime_suspend(struct device *dev)
> +static __maybe_unused int sdhci_msm_runtime_suspend(struct device *dev)
> {
> struct sdhci_host *host = dev_get_drvdata(dev);
> struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
> @@ -2010,7 +2009,7 @@ static int sdhci_msm_runtime_suspend(struct device *dev)
> return 0;
> }
>
> -static int sdhci_msm_runtime_resume(struct device *dev)
> +static __maybe_unused int sdhci_msm_runtime_resume(struct device *dev)
> {
> struct sdhci_host *host = dev_get_drvdata(dev);
> struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
> @@ -2030,7 +2029,6 @@ static int sdhci_msm_runtime_resume(struct device *dev)
>
> return 0;
> }
> -#endif
>
> static const struct dev_pm_ops sdhci_msm_pm_ops = {
> SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
> --
> 2.20.0
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-12-11 9:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-10 20:45 [PATCH] mmc: sdhci-msm: avoid unused function warning Arnd Bergmann
2018-12-11 7:33 ` Adrian Hunter
2018-12-11 9:31 ` Ulf Hansson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).