diff mbox series

[v2] mmc: sdhci: drop useless sdhci_get_compatibility() !OF stub

Message ID 20230314203901.20803-1-krzysztof.kozlowski@linaro.org
State New
Headers show
Series [v2] mmc: sdhci: drop useless sdhci_get_compatibility() !OF stub | expand

Commit Message

Krzysztof Kozlowski March 14, 2023, 8:39 p.m. UTC
The sdhci_get_compatibility() uses OF functions which have stubs for !OF
case, thus entire CONFIG_OF ifdef can be dropped.  This also fixes
!CONFIG_OF W=1 warning:

  drivers/mmc/host/sdhci-pltfm.c:76:6: error: no previous prototype for ‘sdhci_get_compatibility’ [-Werror=missing-prototypes]

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

---

Changes since v1:
1. Drop the stub (Ulf)
---
 drivers/mmc/host/sdhci-pltfm.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Ulf Hansson March 23, 2023, 12:12 p.m. UTC | #1
On Tue, 14 Mar 2023 at 21:39, Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> The sdhci_get_compatibility() uses OF functions which have stubs for !OF
> case, thus entire CONFIG_OF ifdef can be dropped.  This also fixes
> !CONFIG_OF W=1 warning:
>
>   drivers/mmc/host/sdhci-pltfm.c:76:6: error: no previous prototype for ‘sdhci_get_compatibility’ [-Werror=missing-prototypes]
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Applied for next, thanks!

Kind regards
Uffe


>
> ---
>
> Changes since v1:
> 1. Drop the stub (Ulf)
> ---
>  drivers/mmc/host/sdhci-pltfm.c | 4 ----
>  1 file changed, 4 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c
> index 328b132bbe57..673e750a8490 100644
> --- a/drivers/mmc/host/sdhci-pltfm.c
> +++ b/drivers/mmc/host/sdhci-pltfm.c
> @@ -54,7 +54,6 @@ static bool sdhci_wp_inverted(struct device *dev)
>  #endif /* CONFIG_PPC */
>  }
>
> -#ifdef CONFIG_OF
>  static void sdhci_get_compatibility(struct platform_device *pdev)
>  {
>         struct sdhci_host *host = platform_get_drvdata(pdev);
> @@ -72,9 +71,6 @@ static void sdhci_get_compatibility(struct platform_device *pdev)
>             of_device_is_compatible(np, "fsl,mpc8536-esdhc"))
>                 host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
>  }
> -#else
> -void sdhci_get_compatibility(struct platform_device *pdev) {}
> -#endif /* CONFIG_OF */
>
>  void sdhci_get_property(struct platform_device *pdev)
>  {
> --
> 2.34.1
>
diff mbox series

Patch

diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c
index 328b132bbe57..673e750a8490 100644
--- a/drivers/mmc/host/sdhci-pltfm.c
+++ b/drivers/mmc/host/sdhci-pltfm.c
@@ -54,7 +54,6 @@  static bool sdhci_wp_inverted(struct device *dev)
 #endif /* CONFIG_PPC */
 }
 
-#ifdef CONFIG_OF
 static void sdhci_get_compatibility(struct platform_device *pdev)
 {
 	struct sdhci_host *host = platform_get_drvdata(pdev);
@@ -72,9 +71,6 @@  static void sdhci_get_compatibility(struct platform_device *pdev)
 	    of_device_is_compatible(np, "fsl,mpc8536-esdhc"))
 		host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
 }
-#else
-void sdhci_get_compatibility(struct platform_device *pdev) {}
-#endif /* CONFIG_OF */
 
 void sdhci_get_property(struct platform_device *pdev)
 {