diff mbox series

memory: omap-gpmc: Fix compile test on SPARC

Message ID 20200911143251.399-1-krzk@kernel.org
State New
Headers show
Series memory: omap-gpmc: Fix compile test on SPARC | expand

Commit Message

Krzysztof Kozlowski Sept. 11, 2020, 2:32 p.m. UTC
SPARC comes without CONFIG_OF_ADDRESS thus compile testing fails on
linking:

  /usr/bin/sparc64-linux-gnu-ld: drivers/memory/omap-gpmc.o: in function `gpmc_probe_generic_child':
  omap-gpmc.c:(.text.unlikely+0x14ec): undefined reference to `of_platform_device_create'

Fixes: ea0c0ad6b6eb ("memory: Enable compile testing for most of the drivers")
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/memory/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Roger Quadros Sept. 11, 2020, 2:48 p.m. UTC | #1
Hi Krzysztof,

On 11/09/2020 17:32, Krzysztof Kozlowski wrote:
> SPARC comes without CONFIG_OF_ADDRESS thus compile testing fails on
> linking:
> 
>    /usr/bin/sparc64-linux-gnu-ld: drivers/memory/omap-gpmc.o: in function `gpmc_probe_generic_child':
>    omap-gpmc.c:(.text.unlikely+0x14ec): undefined reference to `of_platform_device_create'
> 
> Fixes: ea0c0ad6b6eb ("memory: Enable compile testing for most of the drivers")
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> ---
>   drivers/memory/Kconfig | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/memory/Kconfig b/drivers/memory/Kconfig
> index 8072204bc21a..00e013b14703 100644
> --- a/drivers/memory/Kconfig
> +++ b/drivers/memory/Kconfig
> @@ -104,6 +104,7 @@ config TI_EMIF
>   
>   config OMAP_GPMC
>   	bool "Texas Instruments OMAP SoC GPMC driver" if COMPILE_TEST
> +	depends on OF_ADDRESS

but of_platform_device_create() is defined in platform.c which gets built
irrespective of OF_ADDRESS.

Maybe we need to just depend on CONFIG_OF ?

>   	select GPIOLIB
>   	help
>   	  This driver is for the General Purpose Memory Controller (GPMC)
> 

cheers,
-roger
Roger Quadros Sept. 15, 2020, 7:46 a.m. UTC | #2
On 11/09/2020 17:55, Krzysztof Kozlowski wrote:
> On Fri, 11 Sep 2020 at 16:48, Roger Quadros <rogerq@ti.com> wrote:

>>

>> Hi Krzysztof,

>>

>> On 11/09/2020 17:32, Krzysztof Kozlowski wrote:

>>> SPARC comes without CONFIG_OF_ADDRESS thus compile testing fails on

>>> linking:

>>>

>>>     /usr/bin/sparc64-linux-gnu-ld: drivers/memory/omap-gpmc.o: in function `gpmc_probe_generic_child':

>>>     omap-gpmc.c:(.text.unlikely+0x14ec): undefined reference to `of_platform_device_create'

>>>

>>> Fixes: ea0c0ad6b6eb ("memory: Enable compile testing for most of the drivers")

>>> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

>>> ---

>>>    drivers/memory/Kconfig | 1 +

>>>    1 file changed, 1 insertion(+)

>>>

>>> diff --git a/drivers/memory/Kconfig b/drivers/memory/Kconfig

>>> index 8072204bc21a..00e013b14703 100644

>>> --- a/drivers/memory/Kconfig

>>> +++ b/drivers/memory/Kconfig

>>> @@ -104,6 +104,7 @@ config TI_EMIF

>>>

>>>    config OMAP_GPMC

>>>        bool "Texas Instruments OMAP SoC GPMC driver" if COMPILE_TEST

>>> +     depends on OF_ADDRESS

>>

>> but of_platform_device_create() is defined in platform.c which gets built

>> irrespective of OF_ADDRESS.

>>

>> Maybe we need to just depend on CONFIG_OF ?

> 

> No, the of_platform_device_create() is defined there within #ifdef

> CONFIG_OF_ADDRESS

> 

> The CONFIG_OF was already selected and was not enough.

> 

> Other solution is "depends on !SPARC"...

> 


OK. In that case this patch is better.

cheers,
-roger
-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
Roger Quadros Sept. 15, 2020, 7:46 a.m. UTC | #3
On 11/09/2020 17:32, Krzysztof Kozlowski wrote:
> SPARC comes without CONFIG_OF_ADDRESS thus compile testing fails on
> linking:
> 
>    /usr/bin/sparc64-linux-gnu-ld: drivers/memory/omap-gpmc.o: in function `gpmc_probe_generic_child':
>    omap-gpmc.c:(.text.unlikely+0x14ec): undefined reference to `of_platform_device_create'
> 
> Fixes: ea0c0ad6b6eb ("memory: Enable compile testing for most of the drivers")
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

Acked-by: Roger Quadros <rogerq@ti.com>

> ---
>   drivers/memory/Kconfig | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/memory/Kconfig b/drivers/memory/Kconfig
> index 8072204bc21a..00e013b14703 100644
> --- a/drivers/memory/Kconfig
> +++ b/drivers/memory/Kconfig
> @@ -104,6 +104,7 @@ config TI_EMIF
>   
>   config OMAP_GPMC
>   	bool "Texas Instruments OMAP SoC GPMC driver" if COMPILE_TEST
> +	depends on OF_ADDRESS
>   	select GPIOLIB
>   	help
>   	  This driver is for the General Purpose Memory Controller (GPMC)
>
Krzysztof Kozlowski Sept. 16, 2020, 5:42 p.m. UTC | #4
On Fri, Sep 11, 2020 at 04:32:51PM +0200, Krzysztof Kozlowski wrote:
> SPARC comes without CONFIG_OF_ADDRESS thus compile testing fails on

> linking:

> 

>   /usr/bin/sparc64-linux-gnu-ld: drivers/memory/omap-gpmc.o: in function `gpmc_probe_generic_child':

>   omap-gpmc.c:(.text.unlikely+0x14ec): undefined reference to `of_platform_device_create'

> 

> Fixes: ea0c0ad6b6eb ("memory: Enable compile testing for most of the drivers")

> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

> ---

>  drivers/memory/Kconfig | 1 +

>  1 file changed, 1 insertion(+)


Applied.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/drivers/memory/Kconfig b/drivers/memory/Kconfig
index 8072204bc21a..00e013b14703 100644
--- a/drivers/memory/Kconfig
+++ b/drivers/memory/Kconfig
@@ -104,6 +104,7 @@  config TI_EMIF
 
 config OMAP_GPMC
 	bool "Texas Instruments OMAP SoC GPMC driver" if COMPILE_TEST
+	depends on OF_ADDRESS
 	select GPIOLIB
 	help
 	  This driver is for the General Purpose Memory Controller (GPMC)