linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pinctrl: tegra: Fix build dependency
@ 2016-06-04  6:35 Axel Lin
  2016-06-07  9:17 ` Jon Hunter
  2016-06-08 11:50 ` Linus Walleij
  0 siblings, 2 replies; 4+ messages in thread
From: Axel Lin @ 2016-06-04  6:35 UTC (permalink / raw)
  To: Linus Walleij; +Cc: Stephen Warren, Thierry Reding, linux-kernel, linux-tegra

I got below build error:
ERROR: "tegra_xusb_padctl_legacy_probe" [drivers/phy/tegra/phy-tegra-xusb.ko] undefined!
with below build configuration:
CONFIG_ARCH_TEGRA=y
CONFIG_PINCTRL_TEGRA_XUSB=y
CONFIG_PHY_TEGRA_XUSB=y

The problem is below line in drivers/pinctrl/Makefile
obj-$(CONFIG_PINCTRL_TEGRA)     += tegra/

So even CONFIG_PINCTRL_TEGRA_XUSB=y is set, kbuild still does not compile
the code in drivers/pinctrl/tegra folder if !CONFIG_PINCTRL_TEGRA.

phy-tegra-xusb.c does not use any symbol from pinctrl-tegra.c,
so build pinctrl-tegra.c only when CONFIG_PINCTRL_TEGRA is set.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/pinctrl/Makefile       | 2 +-
 drivers/pinctrl/tegra/Makefile | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pinctrl/Makefile b/drivers/pinctrl/Makefile
index 2ed0b3f..25ec450 100644
--- a/drivers/pinctrl/Makefile
+++ b/drivers/pinctrl/Makefile
@@ -25,7 +25,7 @@ obj-$(CONFIG_PINCTRL_PISTACHIO)	+= pinctrl-pistachio.o
 obj-$(CONFIG_PINCTRL_ROCKCHIP)	+= pinctrl-rockchip.o
 obj-$(CONFIG_PINCTRL_SINGLE)	+= pinctrl-single.o
 obj-$(CONFIG_PINCTRL_SIRF)	+= sirf/
-obj-$(CONFIG_PINCTRL_TEGRA)	+= tegra/
+obj-$(CONFIG_ARCH_TEGRA)	+= tegra/
 obj-$(CONFIG_PINCTRL_TZ1090)	+= pinctrl-tz1090.o
 obj-$(CONFIG_PINCTRL_TZ1090_PDC)	+= pinctrl-tz1090-pdc.o
 obj-$(CONFIG_PINCTRL_U300)	+= pinctrl-u300.o
diff --git a/drivers/pinctrl/tegra/Makefile b/drivers/pinctrl/tegra/Makefile
index a927379..d9ea2be 100644
--- a/drivers/pinctrl/tegra/Makefile
+++ b/drivers/pinctrl/tegra/Makefile
@@ -1,4 +1,4 @@
-obj-y					+= pinctrl-tegra.o
+obj-$(CONFIG_PINCTRL_TEGRA)		+= pinctrl-tegra.o
 obj-$(CONFIG_PINCTRL_TEGRA20)		+= pinctrl-tegra20.o
 obj-$(CONFIG_PINCTRL_TEGRA30)		+= pinctrl-tegra30.o
 obj-$(CONFIG_PINCTRL_TEGRA114)		+= pinctrl-tegra114.o
-- 
2.5.0

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

* Re: [PATCH] pinctrl: tegra: Fix build dependency
  2016-06-04  6:35 [PATCH] pinctrl: tegra: Fix build dependency Axel Lin
@ 2016-06-07  9:17 ` Jon Hunter
  2016-06-07  9:20   ` Jon Hunter
  2016-06-08 11:50 ` Linus Walleij
  1 sibling, 1 reply; 4+ messages in thread
From: Jon Hunter @ 2016-06-07  9:17 UTC (permalink / raw)
  To: Axel Lin, Linus Walleij
  Cc: Stephen Warren, Thierry Reding, linux-kernel, linux-tegra


On 04/06/16 07:35, Axel Lin wrote:
> I got below build error:
> ERROR: "tegra_xusb_padctl_legacy_probe" [drivers/phy/tegra/phy-tegra-xusb.ko] undefined!
> with below build configuration:
> CONFIG_ARCH_TEGRA=y
> CONFIG_PINCTRL_TEGRA_XUSB=y
> CONFIG_PHY_TEGRA_XUSB=y

The above does not make sense because the error is from building a
module but you say you have CONFIG_PINCTRL_TEGRA_XUSB=y. Shouldn't this
be CONFIG_PINCTRL_TEGRA_XUSB=m? However, the error will occur either if
you compile as a module or not, but the changelog should be accurate
nonetheless.

> The problem is below line in drivers/pinctrl/Makefile
> obj-$(CONFIG_PINCTRL_TEGRA)     += tegra/
> 
> So even CONFIG_PINCTRL_TEGRA_XUSB=y is set, kbuild still does not compile
> the code in drivers/pinctrl/tegra folder if !CONFIG_PINCTRL_TEGRA.

I was able to reproduce this by having CONFIG_PINCTRL_TEGRA_XUSB=y and
!CONFIG_PINCTRL_TEGRA. So maybe that's all you need to say in the
changelog with regard to the kernel config and get rid of the initial
statement about kernel config.

> phy-tegra-xusb.c does not use any symbol from pinctrl-tegra.c,
> so build pinctrl-tegra.c only when CONFIG_PINCTRL_TEGRA is set.
> 
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
>  drivers/pinctrl/Makefile       | 2 +-
>  drivers/pinctrl/tegra/Makefile | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/pinctrl/Makefile b/drivers/pinctrl/Makefile
> index 2ed0b3f..25ec450 100644
> --- a/drivers/pinctrl/Makefile
> +++ b/drivers/pinctrl/Makefile
> @@ -25,7 +25,7 @@ obj-$(CONFIG_PINCTRL_PISTACHIO)	+= pinctrl-pistachio.o
>  obj-$(CONFIG_PINCTRL_ROCKCHIP)	+= pinctrl-rockchip.o
>  obj-$(CONFIG_PINCTRL_SINGLE)	+= pinctrl-single.o
>  obj-$(CONFIG_PINCTRL_SIRF)	+= sirf/
> -obj-$(CONFIG_PINCTRL_TEGRA)	+= tegra/
> +obj-$(CONFIG_ARCH_TEGRA)	+= tegra/
>  obj-$(CONFIG_PINCTRL_TZ1090)	+= pinctrl-tz1090.o
>  obj-$(CONFIG_PINCTRL_TZ1090_PDC)	+= pinctrl-tz1090-pdc.o
>  obj-$(CONFIG_PINCTRL_U300)	+= pinctrl-u300.o
> diff --git a/drivers/pinctrl/tegra/Makefile b/drivers/pinctrl/tegra/Makefile
> index a927379..d9ea2be 100644
> --- a/drivers/pinctrl/tegra/Makefile
> +++ b/drivers/pinctrl/tegra/Makefile
> @@ -1,4 +1,4 @@
> -obj-y					+= pinctrl-tegra.o
> +obj-$(CONFIG_PINCTRL_TEGRA)		+= pinctrl-tegra.o
>  obj-$(CONFIG_PINCTRL_TEGRA20)		+= pinctrl-tegra20.o
>  obj-$(CONFIG_PINCTRL_TEGRA30)		+= pinctrl-tegra30.o
>  obj-$(CONFIG_PINCTRL_TEGRA114)		+= pinctrl-tegra114.o

This works for me. So, if you could fix up the changelog, you could add
my ...

Acked-by: Jon Hunter <jonathanh@nvidia.com>

Cheers
Jon

-- 
nvpublic

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

* Re: [PATCH] pinctrl: tegra: Fix build dependency
  2016-06-07  9:17 ` Jon Hunter
@ 2016-06-07  9:20   ` Jon Hunter
  0 siblings, 0 replies; 4+ messages in thread
From: Jon Hunter @ 2016-06-07  9:20 UTC (permalink / raw)
  To: Axel Lin, Linus Walleij
  Cc: Stephen Warren, Thierry Reding, linux-kernel, linux-tegra


On 07/06/16 10:17, Jon Hunter wrote:
> 
> On 04/06/16 07:35, Axel Lin wrote:
>> I got below build error:
>> ERROR: "tegra_xusb_padctl_legacy_probe" [drivers/phy/tegra/phy-tegra-xusb.ko] undefined!
>> with below build configuration:
>> CONFIG_ARCH_TEGRA=y
>> CONFIG_PINCTRL_TEGRA_XUSB=y
>> CONFIG_PHY_TEGRA_XUSB=y
> 
> The above does not make sense because the error is from building a
> module but you say you have CONFIG_PINCTRL_TEGRA_XUSB=y. Shouldn't this
> be CONFIG_PINCTRL_TEGRA_XUSB=m? However, the error will occur either if
> you compile as a module or not, but the changelog should be accurate
> nonetheless.

Sorry I meant CONFIG_PHY_TEGRA_XUSB=m and NOT
CONFIG_PINCTRL_TEGRA_XUSB=m as you are building the phy-tegra-xusb as a
module.

Jon

--
nvpublic

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

* Re: [PATCH] pinctrl: tegra: Fix build dependency
  2016-06-04  6:35 [PATCH] pinctrl: tegra: Fix build dependency Axel Lin
  2016-06-07  9:17 ` Jon Hunter
@ 2016-06-08 11:50 ` Linus Walleij
  1 sibling, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2016-06-08 11:50 UTC (permalink / raw)
  To: Axel Lin; +Cc: Stephen Warren, Thierry Reding, linux-kernel, linux-tegra

On Sat, Jun 4, 2016 at 8:35 AM, Axel Lin <axel.lin@ingics.com> wrote:

> I got below build error:
> ERROR: "tegra_xusb_padctl_legacy_probe" [drivers/phy/tegra/phy-tegra-xusb.ko] undefined!
> with below build configuration:
> CONFIG_ARCH_TEGRA=y
> CONFIG_PINCTRL_TEGRA_XUSB=y
> CONFIG_PHY_TEGRA_XUSB=y
>
> The problem is below line in drivers/pinctrl/Makefile
> obj-$(CONFIG_PINCTRL_TEGRA)     += tegra/
>
> So even CONFIG_PINCTRL_TEGRA_XUSB=y is set, kbuild still does not compile
> the code in drivers/pinctrl/tegra folder if !CONFIG_PINCTRL_TEGRA.
>
> phy-tegra-xusb.c does not use any symbol from pinctrl-tegra.c,
> so build pinctrl-tegra.c only when CONFIG_PINCTRL_TEGRA is set.
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>

Patch applied for fixes.

Yours,
Linus Walleij

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

end of thread, other threads:[~2016-06-08 11:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-04  6:35 [PATCH] pinctrl: tegra: Fix build dependency Axel Lin
2016-06-07  9:17 ` Jon Hunter
2016-06-07  9:20   ` Jon Hunter
2016-06-08 11:50 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).