mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] mmc: sdhci: add static to !OF stub
@ 2023-03-11 11:12 Krzysztof Kozlowski
  2023-03-13 12:49 ` Ulf Hansson
  0 siblings, 1 reply; 3+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-11 11:12 UTC (permalink / raw)
  To: Adrian Hunter, Ulf Hansson, linux-mmc, linux-kernel; +Cc: Krzysztof Kozlowski

The sdhci_get_compatibility() is not used outside of the unit:

  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>
---
 drivers/mmc/host/sdhci-pltfm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c
index 328b132bbe57..245e56324dff 100644
--- a/drivers/mmc/host/sdhci-pltfm.c
+++ b/drivers/mmc/host/sdhci-pltfm.c
@@ -73,7 +73,7 @@ static void sdhci_get_compatibility(struct platform_device *pdev)
 		host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
 }
 #else
-void sdhci_get_compatibility(struct platform_device *pdev) {}
+static 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] mmc: sdhci: add static to !OF stub
  2023-03-11 11:12 [PATCH] mmc: sdhci: add static to !OF stub Krzysztof Kozlowski
@ 2023-03-13 12:49 ` Ulf Hansson
  2023-03-14 20:12   ` Krzysztof Kozlowski
  0 siblings, 1 reply; 3+ messages in thread
From: Ulf Hansson @ 2023-03-13 12:49 UTC (permalink / raw)
  To: Krzysztof Kozlowski; +Cc: Adrian Hunter, linux-mmc, linux-kernel

On Sat, 11 Mar 2023 at 12:12, Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> The sdhci_get_compatibility() is not used outside of the unit:
>
>   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>
> ---
>  drivers/mmc/host/sdhci-pltfm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c
> index 328b132bbe57..245e56324dff 100644
> --- a/drivers/mmc/host/sdhci-pltfm.c
> +++ b/drivers/mmc/host/sdhci-pltfm.c
> @@ -73,7 +73,7 @@ static void sdhci_get_compatibility(struct platform_device *pdev)
>                 host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
>  }
>  #else
> -void sdhci_get_compatibility(struct platform_device *pdev) {}
> +static void sdhci_get_compatibility(struct platform_device *pdev) {}
>  #endif /* CONFIG_OF */

sdhci_get_compatibility() is using OF functions with stubs for !OF.

Perhaps a cleaner option is to drop the #ifdef CONFIG_OF completely
around sdhci_get_compatibility(), thus we can drop the stub too.

>
>  void sdhci_get_property(struct platform_device *pdev)
> --
> 2.34.1
>

Kind regards
Uffe

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mmc: sdhci: add static to !OF stub
  2023-03-13 12:49 ` Ulf Hansson
@ 2023-03-14 20:12   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-14 20:12 UTC (permalink / raw)
  To: Ulf Hansson; +Cc: Adrian Hunter, linux-mmc, linux-kernel

On 13/03/2023 13:49, Ulf Hansson wrote:
> On Sat, 11 Mar 2023 at 12:12, Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> wrote:
>>
>> The sdhci_get_compatibility() is not used outside of the unit:
>>
>>   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>
>> ---
>>  drivers/mmc/host/sdhci-pltfm.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c
>> index 328b132bbe57..245e56324dff 100644
>> --- a/drivers/mmc/host/sdhci-pltfm.c
>> +++ b/drivers/mmc/host/sdhci-pltfm.c
>> @@ -73,7 +73,7 @@ static void sdhci_get_compatibility(struct platform_device *pdev)
>>                 host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
>>  }
>>  #else
>> -void sdhci_get_compatibility(struct platform_device *pdev) {}
>> +static void sdhci_get_compatibility(struct platform_device *pdev) {}
>>  #endif /* CONFIG_OF */
> 
> sdhci_get_compatibility() is using OF functions with stubs for !OF.
> 
> Perhaps a cleaner option is to drop the #ifdef CONFIG_OF completely
> around sdhci_get_compatibility(), thus we can drop the stub too.

Works, indeed, better idea. I'll send v2.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-03-14 20:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-11 11:12 [PATCH] mmc: sdhci: add static to !OF stub Krzysztof Kozlowski
2023-03-13 12:49 ` Ulf Hansson
2023-03-14 20:12   ` Krzysztof Kozlowski

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®