* [PATCH v2] mmc: sdhci: drop useless sdhci_get_compatibility() !OF stub
@ 2023-03-14 20:39 Krzysztof Kozlowski
2023-03-15 5:18 ` Adrian Hunter
2023-03-23 12:12 ` Ulf Hansson
0 siblings, 2 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-14 20:39 UTC (permalink / raw)
To: Adrian Hunter, Ulf Hansson, linux-mmc, linux-kernel; +Cc: Krzysztof Kozlowski
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(-)
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
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH v2] mmc: sdhci: drop useless sdhci_get_compatibility() !OF stub
2023-03-14 20:39 [PATCH v2] mmc: sdhci: drop useless sdhci_get_compatibility() !OF stub Krzysztof Kozlowski
@ 2023-03-15 5:18 ` Adrian Hunter
2023-03-23 12:12 ` Ulf Hansson
1 sibling, 0 replies; 3+ messages in thread
From: Adrian Hunter @ 2023-03-15 5:18 UTC (permalink / raw)
To: Krzysztof Kozlowski, Ulf Hansson, linux-mmc, linux-kernel
On 14/03/23 22:39, Krzysztof Kozlowski 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>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
>
> ---
>
> 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)
> {
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH v2] mmc: sdhci: drop useless sdhci_get_compatibility() !OF stub
2023-03-14 20:39 [PATCH v2] mmc: sdhci: drop useless sdhci_get_compatibility() !OF stub Krzysztof Kozlowski
2023-03-15 5:18 ` Adrian Hunter
@ 2023-03-23 12:12 ` Ulf Hansson
1 sibling, 0 replies; 3+ messages in thread
From: Ulf Hansson @ 2023-03-23 12:12 UTC (permalink / raw)
To: Krzysztof Kozlowski; +Cc: Adrian Hunter, linux-mmc, linux-kernel
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
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-03-23 12:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-14 20:39 [PATCH v2] mmc: sdhci: drop useless sdhci_get_compatibility() !OF stub Krzysztof Kozlowski
2023-03-15 5:18 ` Adrian Hunter
2023-03-23 12:12 ` Ulf Hansson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®