[v2,06/10] mmc: meson-mx-sdio: Depend on OF_ADDRESS and not just OF
diff mbox series

Message ID 20200409064416.83340-7-sboyd@kernel.org
State In Next
Commit 3fd2fdb311fab622ed95568e2a90cb02fe06227c
Headers show
Series
  • Allow COMMON_CLK to be selectable
Related show

Commit Message

Stephen Boyd April 9, 2020, 6:44 a.m. UTC
Making COMMON_CLK a visible option causes the sparc allyesconfig to fail
to build like so:

   sparc64-linux-ld: drivers/mmc/host/meson-mx-sdio.o: in function `meson_mx_mmc_remove':
   meson-mx-sdio.c:(.text+0x70): undefined reference to `of_platform_device_destroy'
   sparc64-linux-ld: drivers/mmc/host/meson-mx-sdio.o: in function `meson_mx_mmc_probe':
   meson-mx-sdio.c:(.text+0x9e4): undefined reference to `of_platform_device_create'
   sparc64-linux-ld: meson-mx-sdio.c:(.text+0xdd4): undefined reference to `of_platform_device_destroy'

This is because the implementation of of_platform_device_destroy() is
inside an #ifdef CONFIG_OF_ADDRESS section of drivers/of/platform.c.
This driver already depends on OF being enabled, so let's tighten that
constrain a little more so that it depends on OF_ADDRESS instead. This
way we won't try to build this driver on platforms that don't have this
function.

Reported-by: kbuild test robot <lkp@intel.com>
Cc: Neil Armstrong <narmstrong@baylibre.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
---
 drivers/mmc/host/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ulf Hansson April 21, 2020, 2:04 p.m. UTC | #1
On Thu, 9 Apr 2020 at 08:44, Stephen Boyd <sboyd@kernel.org> wrote:
>
> Making COMMON_CLK a visible option causes the sparc allyesconfig to fail
> to build like so:
>
>    sparc64-linux-ld: drivers/mmc/host/meson-mx-sdio.o: in function `meson_mx_mmc_remove':
>    meson-mx-sdio.c:(.text+0x70): undefined reference to `of_platform_device_destroy'
>    sparc64-linux-ld: drivers/mmc/host/meson-mx-sdio.o: in function `meson_mx_mmc_probe':
>    meson-mx-sdio.c:(.text+0x9e4): undefined reference to `of_platform_device_create'
>    sparc64-linux-ld: meson-mx-sdio.c:(.text+0xdd4): undefined reference to `of_platform_device_destroy'
>
> This is because the implementation of of_platform_device_destroy() is
> inside an #ifdef CONFIG_OF_ADDRESS section of drivers/of/platform.c.
> This driver already depends on OF being enabled, so let's tighten that
> constrain a little more so that it depends on OF_ADDRESS instead. This
> way we won't try to build this driver on platforms that don't have this
> function.
>
> Reported-by: kbuild test robot <lkp@intel.com>
> Cc: Neil Armstrong <narmstrong@baylibre.com>
> Cc: Ulf Hansson <ulf.hansson@linaro.org>
> Signed-off-by: Stephen Boyd <sboyd@kernel.org>

I don't have the complete picture here, can I just apply this a fix to
my mmc tree?

Kind regards
Uffe

> ---
>  drivers/mmc/host/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
> index 3a5089f0332c..31b2a8826b30 100644
> --- a/drivers/mmc/host/Kconfig
> +++ b/drivers/mmc/host/Kconfig
> @@ -409,7 +409,7 @@ config MMC_MESON_MX_SDIO
>         tristate "Amlogic Meson6/Meson8/Meson8b SD/MMC Host Controller support"
>         depends on ARCH_MESON || COMPILE_TEST
>         depends on COMMON_CLK
> -       depends on OF
> +       depends on OF_ADDRESS
>         help
>           This selects support for the SD/MMC Host Controller on
>           Amlogic Meson6, Meson8 and Meson8b SoCs.
> --
> Sent by a computer, using git, on the internet
>
Stephen Boyd April 22, 2020, 10:14 a.m. UTC | #2
Quoting Ulf Hansson (2020-04-21 07:04:54)
> On Thu, 9 Apr 2020 at 08:44, Stephen Boyd <sboyd@kernel.org> wrote:
> >
> > Making COMMON_CLK a visible option causes the sparc allyesconfig to fail
> > to build like so:
> >
> >    sparc64-linux-ld: drivers/mmc/host/meson-mx-sdio.o: in function `meson_mx_mmc_remove':
> >    meson-mx-sdio.c:(.text+0x70): undefined reference to `of_platform_device_destroy'
> >    sparc64-linux-ld: drivers/mmc/host/meson-mx-sdio.o: in function `meson_mx_mmc_probe':
> >    meson-mx-sdio.c:(.text+0x9e4): undefined reference to `of_platform_device_create'
> >    sparc64-linux-ld: meson-mx-sdio.c:(.text+0xdd4): undefined reference to `of_platform_device_destroy'
> >
> > This is because the implementation of of_platform_device_destroy() is
> > inside an #ifdef CONFIG_OF_ADDRESS section of drivers/of/platform.c.
> > This driver already depends on OF being enabled, so let's tighten that
> > constrain a little more so that it depends on OF_ADDRESS instead. This
> > way we won't try to build this driver on platforms that don't have this
> > function.
> >
> > Reported-by: kbuild test robot <lkp@intel.com>
> > Cc: Neil Armstrong <narmstrong@baylibre.com>
> > Cc: Ulf Hansson <ulf.hansson@linaro.org>
> > Signed-off-by: Stephen Boyd <sboyd@kernel.org>
> 
> I don't have the complete picture here, can I just apply this a fix to
> my mmc tree?
> 

If this patch stays in the series then I can avoid a bisection hole. And
it also doesn't matter until COMMON_CLK config becomes selectable. Maybe
just ack and let it go through clk tree? Unless there's something
changing here in the mmc tree?
Ulf Hansson April 22, 2020, 10:39 a.m. UTC | #3
On Wed, 22 Apr 2020 at 12:14, Stephen Boyd <sboyd@kernel.org> wrote:
>
> Quoting Ulf Hansson (2020-04-21 07:04:54)
> > On Thu, 9 Apr 2020 at 08:44, Stephen Boyd <sboyd@kernel.org> wrote:
> > >
> > > Making COMMON_CLK a visible option causes the sparc allyesconfig to fail
> > > to build like so:
> > >
> > >    sparc64-linux-ld: drivers/mmc/host/meson-mx-sdio.o: in function `meson_mx_mmc_remove':
> > >    meson-mx-sdio.c:(.text+0x70): undefined reference to `of_platform_device_destroy'
> > >    sparc64-linux-ld: drivers/mmc/host/meson-mx-sdio.o: in function `meson_mx_mmc_probe':
> > >    meson-mx-sdio.c:(.text+0x9e4): undefined reference to `of_platform_device_create'
> > >    sparc64-linux-ld: meson-mx-sdio.c:(.text+0xdd4): undefined reference to `of_platform_device_destroy'
> > >
> > > This is because the implementation of of_platform_device_destroy() is
> > > inside an #ifdef CONFIG_OF_ADDRESS section of drivers/of/platform.c.
> > > This driver already depends on OF being enabled, so let's tighten that
> > > constrain a little more so that it depends on OF_ADDRESS instead. This
> > > way we won't try to build this driver on platforms that don't have this
> > > function.
> > >
> > > Reported-by: kbuild test robot <lkp@intel.com>
> > > Cc: Neil Armstrong <narmstrong@baylibre.com>
> > > Cc: Ulf Hansson <ulf.hansson@linaro.org>
> > > Signed-off-by: Stephen Boyd <sboyd@kernel.org>
> >
> > I don't have the complete picture here, can I just apply this a fix to
> > my mmc tree?
> >
>
> If this patch stays in the series then I can avoid a bisection hole. And
> it also doesn't matter until COMMON_CLK config becomes selectable. Maybe
> just ack and let it go through clk tree? Unless there's something
> changing here in the mmc tree?

This file is likely to change in my mmc-tree. However, let's deal with
the conflict, if/when that happens. So, please pick it through your
clock tree.

Acked-by: Ulf Hansson <ulf.hansson@linaro.org>

Kind regards
Uffe
Stephen Boyd May 14, 2020, 7:57 p.m. UTC | #4
Quoting Stephen Boyd (2020-04-08 23:44:12)
> Making COMMON_CLK a visible option causes the sparc allyesconfig to fail
> to build like so:
> 
>    sparc64-linux-ld: drivers/mmc/host/meson-mx-sdio.o: in function `meson_mx_mmc_remove':
>    meson-mx-sdio.c:(.text+0x70): undefined reference to `of_platform_device_destroy'
>    sparc64-linux-ld: drivers/mmc/host/meson-mx-sdio.o: in function `meson_mx_mmc_probe':
>    meson-mx-sdio.c:(.text+0x9e4): undefined reference to `of_platform_device_create'
>    sparc64-linux-ld: meson-mx-sdio.c:(.text+0xdd4): undefined reference to `of_platform_device_destroy'
> 
> This is because the implementation of of_platform_device_destroy() is
> inside an #ifdef CONFIG_OF_ADDRESS section of drivers/of/platform.c.
> This driver already depends on OF being enabled, so let's tighten that
> constrain a little more so that it depends on OF_ADDRESS instead. This
> way we won't try to build this driver on platforms that don't have this
> function.
> 
> Reported-by: kbuild test robot <lkp@intel.com>
> Cc: Neil Armstrong <narmstrong@baylibre.com>
> Cc: Ulf Hansson <ulf.hansson@linaro.org>
> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
> ---

Applied to clk-next

Patch
diff mbox series

diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
index 3a5089f0332c..31b2a8826b30 100644
--- a/drivers/mmc/host/Kconfig
+++ b/drivers/mmc/host/Kconfig
@@ -409,7 +409,7 @@  config MMC_MESON_MX_SDIO
 	tristate "Amlogic Meson6/Meson8/Meson8b SD/MMC Host Controller support"
 	depends on ARCH_MESON || COMPILE_TEST
 	depends on COMMON_CLK
-	depends on OF
+	depends on OF_ADDRESS
 	help
 	  This selects support for the SD/MMC Host Controller on
 	  Amlogic Meson6, Meson8 and Meson8b SoCs.