linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pinctrl: pass -DDEBUG in subdirs
@ 2015-01-09  9:41 Linus Walleij
  2015-01-09 10:22 ` Yingjoe Chen
  0 siblings, 1 reply; 5+ messages in thread
From: Linus Walleij @ 2015-01-09  9:41 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel; +Cc: linux-gpio, Linus Walleij

When drivers are compiled in subdirectories the -DDEBUG flag need
to be passed in the individual Makefiles.

Reported-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/pinctrl/berlin/Makefile    | 1 +
 drivers/pinctrl/freescale/Makefile | 1 +
 drivers/pinctrl/mvebu/Makefile     | 1 +
 drivers/pinctrl/nomadik/Makefile   | 1 +
 drivers/pinctrl/qcom/Makefile      | 1 +
 drivers/pinctrl/samsung/Makefile   | 2 +-
 drivers/pinctrl/sh-pfc/Makefile    | 1 +
 drivers/pinctrl/sirf/Makefile      | 2 +-
 drivers/pinctrl/spear/Makefile     | 2 +-
 drivers/pinctrl/sunxi/Makefile     | 1 +
 drivers/pinctrl/vt8500/Makefile    | 2 +-
 11 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/drivers/pinctrl/berlin/Makefile b/drivers/pinctrl/berlin/Makefile
index deb0c6baf316..219179d7a4df 100644
--- a/drivers/pinctrl/berlin/Makefile
+++ b/drivers/pinctrl/berlin/Makefile
@@ -1,3 +1,4 @@
+ccflags-$(CONFIG_DEBUG_PINCTRL)		+= -DDEBUG
 obj-$(CONFIG_PINCTRL_BERLIN)		+= berlin.o
 obj-$(CONFIG_PINCTRL_BERLIN_BG2)	+= berlin-bg2.o
 obj-$(CONFIG_PINCTRL_BERLIN_BG2CD)	+= berlin-bg2cd.o
diff --git a/drivers/pinctrl/freescale/Makefile b/drivers/pinctrl/freescale/Makefile
index bba73c22f043..73f6e07357e1 100644
--- a/drivers/pinctrl/freescale/Makefile
+++ b/drivers/pinctrl/freescale/Makefile
@@ -1,4 +1,5 @@
 # Freescale pin control drivers
+ccflags-$(CONFIG_DEBUG_PINCTRL)	+= -DDEBUG
 obj-$(CONFIG_PINCTRL_IMX)	+= pinctrl-imx.o
 obj-$(CONFIG_PINCTRL_IMX1_CORE)	+= pinctrl-imx1-core.o
 obj-$(CONFIG_PINCTRL_IMX1)	+= pinctrl-imx1.o
diff --git a/drivers/pinctrl/mvebu/Makefile b/drivers/pinctrl/mvebu/Makefile
index a0818e96374b..0ffeb6ec5c0a 100644
--- a/drivers/pinctrl/mvebu/Makefile
+++ b/drivers/pinctrl/mvebu/Makefile
@@ -1,3 +1,4 @@
+ccflags-$(CONFIG_DEBUG_PINCTRL)	+= -DDEBUG
 obj-$(CONFIG_PINCTRL_MVEBU)	+= pinctrl-mvebu.o
 obj-$(CONFIG_PINCTRL_DOVE)	+= pinctrl-dove.o
 obj-$(CONFIG_PINCTRL_KIRKWOOD)	+= pinctrl-kirkwood.o
diff --git a/drivers/pinctrl/nomadik/Makefile b/drivers/pinctrl/nomadik/Makefile
index 30b27f18cd52..459d20888462 100644
--- a/drivers/pinctrl/nomadik/Makefile
+++ b/drivers/pinctrl/nomadik/Makefile
@@ -1,4 +1,5 @@
 # Nomadik family pin control drivers
+ccflags-$(CONFIG_DEBUG_PINCTRL)	+= -DDEBUG
 obj-$(CONFIG_PINCTRL_ABX500)	+= pinctrl-abx500.o
 obj-$(CONFIG_PINCTRL_AB8500)	+= pinctrl-ab8500.o
 obj-$(CONFIG_PINCTRL_AB8540)	+= pinctrl-ab8540.o
diff --git a/drivers/pinctrl/qcom/Makefile b/drivers/pinctrl/qcom/Makefile
index bfd79af5f982..5d81cdd981e0 100644
--- a/drivers/pinctrl/qcom/Makefile
+++ b/drivers/pinctrl/qcom/Makefile
@@ -1,4 +1,5 @@
 # Qualcomm pin control drivers
+ccflags-$(CONFIG_DEBUG_PINCTRL)	+= -DDEBUG
 obj-$(CONFIG_PINCTRL_MSM)	+= pinctrl-msm.o
 obj-$(CONFIG_PINCTRL_APQ8064)	+= pinctrl-apq8064.o
 obj-$(CONFIG_PINCTRL_APQ8084)	+= pinctrl-apq8084.o
diff --git a/drivers/pinctrl/samsung/Makefile b/drivers/pinctrl/samsung/Makefile
index 70160c059edd..156d9aff06f5 100644
--- a/drivers/pinctrl/samsung/Makefile
+++ b/drivers/pinctrl/samsung/Makefile
@@ -1,5 +1,5 @@
 # Samsung pin control drivers
-
+ccflags-$(CONFIG_DEBUG_PINCTRL)	+= -DDEBUG
 obj-$(CONFIG_PINCTRL_SAMSUNG)	+= pinctrl-samsung.o
 obj-$(CONFIG_PINCTRL_EXYNOS)	+= pinctrl-exynos.o
 obj-$(CONFIG_PINCTRL_EXYNOS5440)	+= pinctrl-exynos5440.o
diff --git a/drivers/pinctrl/sh-pfc/Makefile b/drivers/pinctrl/sh-pfc/Makefile
index ad8f4cf9faaa..55d7ad4ecae7 100644
--- a/drivers/pinctrl/sh-pfc/Makefile
+++ b/drivers/pinctrl/sh-pfc/Makefile
@@ -1,3 +1,4 @@
+ccflags-$(CONFIG_DEBUG_PINCTRL)	+= -DDEBUG
 sh-pfc-objs			= core.o pinctrl.o
 ifeq ($(CONFIG_GPIO_SH_PFC),y)
 sh-pfc-objs			+= gpio.o
diff --git a/drivers/pinctrl/sirf/Makefile b/drivers/pinctrl/sirf/Makefile
index 3ffc475ce40c..e761b1fd9fa9 100644
--- a/drivers/pinctrl/sirf/Makefile
+++ b/drivers/pinctrl/sirf/Makefile
@@ -1,5 +1,5 @@
 # CSR SiRFsoc pinmux support
-
+ccflags-$(CONFIG_DEBUG_PINCTRL)	+= -DDEBUG
 obj-y	+= pinctrl-sirf.o
 obj-y	+= pinctrl-prima2.o
 obj-y	+= pinctrl-atlas6.o
diff --git a/drivers/pinctrl/spear/Makefile b/drivers/pinctrl/spear/Makefile
index 0e400ebeb8ff..9ef35de6a2a0 100644
--- a/drivers/pinctrl/spear/Makefile
+++ b/drivers/pinctrl/spear/Makefile
@@ -1,5 +1,5 @@
 # SPEAr pinmux support
-
+ccflags-$(CONFIG_DEBUG_PINCTRL)		+= -DDEBUG
 obj-$(CONFIG_PINCTRL_SPEAR_PLGPIO)	+= pinctrl-plgpio.o
 obj-$(CONFIG_PINCTRL_SPEAR)	+= pinctrl-spear.o
 obj-$(CONFIG_PINCTRL_SPEAR3XX)	+= pinctrl-spear3xx.o
diff --git a/drivers/pinctrl/sunxi/Makefile b/drivers/pinctrl/sunxi/Makefile
index c7d92e4673b5..b440b24ac9ac 100644
--- a/drivers/pinctrl/sunxi/Makefile
+++ b/drivers/pinctrl/sunxi/Makefile
@@ -1,4 +1,5 @@
 # Core
+ccflags-$(CONFIG_DEBUG_PINCTRL)		+= -DDEBUG
 obj-$(CONFIG_PINCTRL_SUNXI_COMMON)	+= pinctrl-sunxi.o
 
 # SoC Drivers
diff --git a/drivers/pinctrl/vt8500/Makefile b/drivers/pinctrl/vt8500/Makefile
index 24ec45dd0d80..55a140aa7803 100644
--- a/drivers/pinctrl/vt8500/Makefile
+++ b/drivers/pinctrl/vt8500/Makefile
@@ -1,5 +1,5 @@
 # VIA/Wondermedia pinctrl support
-
+ccflags-$(CONFIG_DEBUG_PINCTRL)	+= -DDEBUG
 obj-$(CONFIG_PINCTRL_WMT)	+= pinctrl-wmt.o
 obj-$(CONFIG_PINCTRL_VT8500)	+= pinctrl-vt8500.o
 obj-$(CONFIG_PINCTRL_WM8505)	+= pinctrl-wm8505.o
-- 
1.9.3


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

* Re: [PATCH] pinctrl: pass -DDEBUG in subdirs
  2015-01-09  9:41 [PATCH] pinctrl: pass -DDEBUG in subdirs Linus Walleij
@ 2015-01-09 10:22 ` Yingjoe Chen
  2015-01-10 21:46   ` Linus Walleij
  0 siblings, 1 reply; 5+ messages in thread
From: Yingjoe Chen @ 2015-01-09 10:22 UTC (permalink / raw)
  To: Linus Walleij; +Cc: linux-kernel, linux-arm-kernel, linux-gpio


On Fri, 2015-01-09 at 10:41 +0100, Linus Walleij wrote:
> When drivers are compiled in subdirectories the -DDEBUG flag need
> to be passed in the individual Makefiles.

Hi,

It will be easy to forget adding this when adding new subdirectories.
Can we do this instead?

diff --git a/drivers/pinctrl/Makefile b/drivers/pinctrl/Makefile
index af365c5..36f1d620 100644
--- a/drivers/pinctrl/Makefile
+++ b/drivers/pinctrl/Makefile
@@ -1,6 +1,6 @@
 # generic pinmux support

-ccflags-$(CONFIG_DEBUG_PINCTRL)        += -DDEBUG
+subdir-ccflags-$(CONFIG_DEBUG_PINCTRL) += -DDEBUG

Joe.C




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

* Re: [PATCH] pinctrl: pass -DDEBUG in subdirs
  2015-01-09 10:22 ` Yingjoe Chen
@ 2015-01-10 21:46   ` Linus Walleij
  0 siblings, 0 replies; 5+ messages in thread
From: Linus Walleij @ 2015-01-10 21:46 UTC (permalink / raw)
  To: Yingjoe Chen; +Cc: linux-kernel, linux-arm-kernel, linux-gpio

On Fri, Jan 9, 2015 at 11:22 AM, Yingjoe Chen <yingjoe.chen@mediatek.com> wrote:
>
> On Fri, 2015-01-09 at 10:41 +0100, Linus Walleij wrote:
>> When drivers are compiled in subdirectories the -DDEBUG flag need
>> to be passed in the individual Makefiles.
>
> Hi,
>
> It will be easy to forget adding this when adding new subdirectories.
> Can we do this instead?
(...)
> -ccflags-$(CONFIG_DEBUG_PINCTRL)        += -DDEBUG
> +subdir-ccflags-$(CONFIG_DEBUG_PINCTRL) += -DDEBUG

Yeah of course :/

subdir-ccflags applies to this subdir and all below it then I take it.
Typical I don't know such stuff :(

Yours,
Linus Walleij

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

* Re: [PATCH] pinctrl: pass -DDEBUG in subdirs
  2015-01-10 21:51 Linus Walleij
@ 2015-01-12  3:58 ` Viresh Kumar
  0 siblings, 0 replies; 5+ messages in thread
From: Viresh Kumar @ 2015-01-12  3:58 UTC (permalink / raw)
  To: Linus Walleij; +Cc: linux-kernel, linux-arm-kernel, linux-gpio, Mika Westerberg

On Sun, Jan 11, 2015 at 3:21 AM, Linus Walleij <linus.walleij@linaro.org> wrote:
> When drivers are compiled in subdirectories the -DDEBUG flag need
> to be passed in the individual Makefiles.

This doesn't look good anymore..

> Reported-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> Suggested-by: Yingjoe Chen <yingjoe.chen@mediatek.com>
> Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> This replaces Mika's patch too.
> ---
>  drivers/pinctrl/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/Makefile b/drivers/pinctrl/Makefile
> index c030b3db8034..c7139ba195fe 100644
> --- a/drivers/pinctrl/Makefile
> +++ b/drivers/pinctrl/Makefile
> @@ -1,6 +1,6 @@
>  # generic pinmux support
>
> -ccflags-$(CONFIG_DEBUG_PINCTRL)        += -DDEBUG
> +subdir-ccflags-$(CONFIG_DEBUG_PINCTRL) += -DDEBUG
>
>  obj-$(CONFIG_PINCTRL)          += core.o pinctrl-utils.o
>  obj-$(CONFIG_PINMUX)           += pinmux.o
> --
> 1.9.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

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

* [PATCH] pinctrl: pass -DDEBUG in subdirs
@ 2015-01-10 21:51 Linus Walleij
  2015-01-12  3:58 ` Viresh Kumar
  0 siblings, 1 reply; 5+ messages in thread
From: Linus Walleij @ 2015-01-10 21:51 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel; +Cc: linux-gpio, Linus Walleij, Mika Westerberg

When drivers are compiled in subdirectories the -DDEBUG flag need
to be passed in the individual Makefiles.

Reported-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Suggested-by: Yingjoe Chen <yingjoe.chen@mediatek.com>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
This replaces Mika's patch too.
---
 drivers/pinctrl/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/Makefile b/drivers/pinctrl/Makefile
index c030b3db8034..c7139ba195fe 100644
--- a/drivers/pinctrl/Makefile
+++ b/drivers/pinctrl/Makefile
@@ -1,6 +1,6 @@
 # generic pinmux support
 
-ccflags-$(CONFIG_DEBUG_PINCTRL)	+= -DDEBUG
+subdir-ccflags-$(CONFIG_DEBUG_PINCTRL)	+= -DDEBUG
 
 obj-$(CONFIG_PINCTRL)		+= core.o pinctrl-utils.o
 obj-$(CONFIG_PINMUX)		+= pinmux.o
-- 
1.9.3


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

end of thread, other threads:[~2015-01-12  3:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-09  9:41 [PATCH] pinctrl: pass -DDEBUG in subdirs Linus Walleij
2015-01-09 10:22 ` Yingjoe Chen
2015-01-10 21:46   ` Linus Walleij
2015-01-10 21:51 Linus Walleij
2015-01-12  3:58 ` Viresh Kumar

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).