diff mbox series

[-next] mmc: sdhci-esdhc-imx: fix defined but not used warnings

Message ID 20250424034610.441532-1-rdunlap@infradead.org
State New
Headers show
Series [-next] mmc: sdhci-esdhc-imx: fix defined but not used warnings | expand

Commit Message

Randy Dunlap April 24, 2025, 3:46 a.m. UTC
Fix warnings when CONFIG_PM=y and CONFIG_PM_SLEEP is not set by
surrounding the 2 functions with #ifdef CONFIG_PM_SLEEP.

drivers/mmc/host/sdhci-esdhc-imx.c:1659:13: warning: 'sdhc_esdhc_tuning_restore' defined but not used [-Wunused-function]
 1659 | static void sdhc_esdhc_tuning_restore(struct sdhci_host *host)
drivers/mmc/host/sdhci-esdhc-imx.c:1637:13: warning: 'sdhc_esdhc_tuning_save' defined but not used [-Wunused-function]
 1637 | static void sdhc_esdhc_tuning_save(struct sdhci_host *host)

Fixes: 3d1eea493894 ("mmc: sdhci-esdhc-imx: Save tuning value when card stays powered in suspend")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Luke Wang <ziniu.wang_1@nxp.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Cc: linux-mmc@vger.kernel.org
Cc: Haibo Chen <haibo.chen@nxp.com>
Cc: imx@lists.linux.dev
Cc: s32@nxp.com
---
 drivers/mmc/host/sdhci-esdhc-imx.c |    2 ++
 1 file changed, 2 insertions(+)

Comments

Bough Chen April 24, 2025, 7:33 a.m. UTC | #1
> -----Original Message-----
> From: Randy Dunlap <rdunlap@infradead.org>
> Sent: 2025年4月24日 11:46
> To: linux-kernel@vger.kernel.org
> Cc: Randy Dunlap <rdunlap@infradead.org>; Luke Wang
> <ziniu.wang_1@nxp.com>; Ulf Hansson <ulf.hansson@linaro.org>;
> linux-mmc@vger.kernel.org; Bough Chen <haibo.chen@nxp.com>;
> imx@lists.linux.dev; dl-S32 <S32@nxp.com>
> Subject: [PATCH -next] mmc: sdhci-esdhc-imx: fix defined but not used warnings
> 
> [Some people who received this message don't often get email from
> rdunlap@infradead.org. Learn why this is important at
> https://aka.ms/LearnAboutSenderIdentification ]
> 
> Fix warnings when CONFIG_PM=y and CONFIG_PM_SLEEP is not set by
> surrounding the 2 functions with #ifdef CONFIG_PM_SLEEP.
> 
> drivers/mmc/host/sdhci-esdhc-imx.c:1659:13: warning:
> 'sdhc_esdhc_tuning_restore' defined but not used [-Wunused-function]
>  1659 | static void sdhc_esdhc_tuning_restore(struct sdhci_host *host)
> drivers/mmc/host/sdhci-esdhc-imx.c:1637:13: warning:
> 'sdhc_esdhc_tuning_save' defined but not used [-Wunused-function]
>  1637 | static void sdhc_esdhc_tuning_save(struct sdhci_host *host)

Reviewed-by: Haibo Chen <haibo.chen@nxp.com>

Regards
Haibo Chen
> 
> Fixes: 3d1eea493894 ("mmc: sdhci-esdhc-imx: Save tuning value when card
> stays powered in suspend")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Luke Wang <ziniu.wang_1@nxp.com>
> Cc: Ulf Hansson <ulf.hansson@linaro.org>
> Cc: linux-mmc@vger.kernel.org
> Cc: Haibo Chen <haibo.chen@nxp.com>
> Cc: imx@lists.linux.dev
> Cc: s32@nxp.com
> ---
>  drivers/mmc/host/sdhci-esdhc-imx.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> --- linux-next-20250423.orig/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ linux-next-20250423/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -1634,6 +1634,7 @@ static void sdhci_esdhc_imx_hwinit(struc
>         }
>  }
> 
> +#ifdef CONFIG_PM_SLEEP
>  static void sdhc_esdhc_tuning_save(struct sdhci_host *host)  {
>         struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -1688,6
> +1689,7 @@ static void sdhc_esdhc_tuning_restore(st
>                        host->ioaddr + ESDHC_TUNE_CTRL_STATUS);
>         }
>  }
> +#endif
> 
>  static void esdhc_cqe_enable(struct mmc_host *mmc)  {
Ulf Hansson April 29, 2025, 10:06 a.m. UTC | #2
On Thu, 24 Apr 2025 at 05:46, Randy Dunlap <rdunlap@infradead.org> wrote:
>
> Fix warnings when CONFIG_PM=y and CONFIG_PM_SLEEP is not set by
> surrounding the 2 functions with #ifdef CONFIG_PM_SLEEP.
>
> drivers/mmc/host/sdhci-esdhc-imx.c:1659:13: warning: 'sdhc_esdhc_tuning_restore' defined but not used [-Wunused-function]
>  1659 | static void sdhc_esdhc_tuning_restore(struct sdhci_host *host)
> drivers/mmc/host/sdhci-esdhc-imx.c:1637:13: warning: 'sdhc_esdhc_tuning_save' defined but not used [-Wunused-function]
>  1637 | static void sdhc_esdhc_tuning_save(struct sdhci_host *host)
>
> Fixes: 3d1eea493894 ("mmc: sdhci-esdhc-imx: Save tuning value when card stays powered in suspend")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Luke Wang <ziniu.wang_1@nxp.com>
> Cc: Ulf Hansson <ulf.hansson@linaro.org>
> Cc: linux-mmc@vger.kernel.org
> Cc: Haibo Chen <haibo.chen@nxp.com>
> Cc: imx@lists.linux.dev
> Cc: s32@nxp.com

Applied for next, thanks!

Kind regards
Uffe


> ---
>  drivers/mmc/host/sdhci-esdhc-imx.c |    2 ++
>  1 file changed, 2 insertions(+)
>
> --- linux-next-20250423.orig/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ linux-next-20250423/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -1634,6 +1634,7 @@ static void sdhci_esdhc_imx_hwinit(struc
>         }
>  }
>
> +#ifdef CONFIG_PM_SLEEP
>  static void sdhc_esdhc_tuning_save(struct sdhci_host *host)
>  {
>         struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
> @@ -1688,6 +1689,7 @@ static void sdhc_esdhc_tuning_restore(st
>                        host->ioaddr + ESDHC_TUNE_CTRL_STATUS);
>         }
>  }
> +#endif
>
>  static void esdhc_cqe_enable(struct mmc_host *mmc)
>  {
diff mbox series

Patch

--- linux-next-20250423.orig/drivers/mmc/host/sdhci-esdhc-imx.c
+++ linux-next-20250423/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -1634,6 +1634,7 @@  static void sdhci_esdhc_imx_hwinit(struc
 	}
 }
 
+#ifdef CONFIG_PM_SLEEP
 static void sdhc_esdhc_tuning_save(struct sdhci_host *host)
 {
 	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
@@ -1688,6 +1689,7 @@  static void sdhc_esdhc_tuning_restore(st
 		       host->ioaddr + ESDHC_TUNE_CTRL_STATUS);
 	}
 }
+#endif
 
 static void esdhc_cqe_enable(struct mmc_host *mmc)
 {