All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/6] Remove unneeded build directory traversals
@ 2017-01-05 21:01 ` Andrew F. Davis
  0 siblings, 0 replies; 20+ messages in thread
From: Andrew F. Davis @ 2017-01-05 21:01 UTC (permalink / raw)
  To: Russell King, Miguel Ojeda Sandonis, Wolfram Sang,
	Richard Purdie, Benjamin Herrenschmidt, Mauro Carvalho Chehab,
	Ulf Hansson, Lauro Ramos Venancio, Aloisio Almeida Jr,
	Samuel Ortiz, Ingo Molnar
  Cc: linux-pwm, linux-wireless, linux-kernel, Andrew F . Davis,
	linuxppc-dev, linux-media

Hello all,

I was building a kernel for x86 and noticed Make still descended into
directories like drivers/gpu/drm/hisilicon, this seems kind of odd given
nothing will be built here. It looks to be due to some directories being
included in obj-y unconditionally instead of only when the relevant
CONFIG_ is set.

These patches are split by subsystem in-case, for some reason, a file in
a directory does need to be built, I believe I have checked for all
instances of this, but a quick review from some maintainers would be nice.

Thanks,
Andrew

Changes from v1:
 - Removed patches already taken by maintainers
 - Rebased on v4.10-rc1 (no changes needed)

Andrew F. Davis (6):
  pwm: Only descend into pwm directory when CONFIG_PWM is set
  amba: Only descend into amba directory when CONFIG_ARM_AMBA is set
  NFC: Only descend into nfc directory when CONFIG_NFC is set
  macintosh: Only descend into directory when CONFIG_MACINTOSH_DRIVERS
    is set
  auxdisplay: Only descend into directory when CONFIG_AUXDISPLAY is set
  [media] Only descend into directory when CONFIG_MEDIA_SUPPORT is set

 drivers/Makefile | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

-- 
2.11.0

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

* [PATCH v2 0/6] Remove unneeded build directory traversals
@ 2017-01-05 21:01 ` Andrew F. Davis
  0 siblings, 0 replies; 20+ messages in thread
From: Andrew F. Davis @ 2017-01-05 21:01 UTC (permalink / raw)
  To: Russell King, Miguel Ojeda Sandonis, Wolfram Sang,
	Richard Purdie, Benjamin Herrenschmidt, Mauro Carvalho Chehab,
	Ulf Hansson, Lauro Ramos Venancio, Aloisio Almeida Jr,
	Samuel Ortiz, Ingo Molnar
  Cc: linuxppc-dev, linux-media, linux-wireless, linux-pwm,
	linux-kernel, Andrew F . Davis

Hello all,

I was building a kernel for x86 and noticed Make still descended into
directories like drivers/gpu/drm/hisilicon, this seems kind of odd given
nothing will be built here. It looks to be due to some directories being
included in obj-y unconditionally instead of only when the relevant
CONFIG_ is set.

These patches are split by subsystem in-case, for some reason, a file in
a directory does need to be built, I believe I have checked for all
instances of this, but a quick review from some maintainers would be nice.

Thanks,
Andrew

Changes from v1:
 - Removed patches already taken by maintainers
 - Rebased on v4.10-rc1 (no changes needed)

Andrew F. Davis (6):
  pwm: Only descend into pwm directory when CONFIG_PWM is set
  amba: Only descend into amba directory when CONFIG_ARM_AMBA is set
  NFC: Only descend into nfc directory when CONFIG_NFC is set
  macintosh: Only descend into directory when CONFIG_MACINTOSH_DRIVERS
    is set
  auxdisplay: Only descend into directory when CONFIG_AUXDISPLAY is set
  [media] Only descend into directory when CONFIG_MEDIA_SUPPORT is set

 drivers/Makefile | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

-- 
2.11.0

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

* [PATCH v2 1/6] pwm: Only descend into pwm directory when CONFIG_PWM is set
  2017-01-05 21:01 ` Andrew F. Davis
@ 2017-01-05 21:01   ` Andrew F. Davis
  -1 siblings, 0 replies; 20+ messages in thread
From: Andrew F. Davis @ 2017-01-05 21:01 UTC (permalink / raw)
  To: Russell King, Miguel Ojeda Sandonis, Wolfram Sang,
	Richard Purdie, Benjamin Herrenschmidt, Mauro Carvalho Chehab,
	Ulf Hansson, Lauro Ramos Venancio, Aloisio Almeida Jr,
	Samuel Ortiz, Ingo Molnar
  Cc: linux-pwm, linux-wireless, linux-kernel, Andrew F . Davis,
	linuxppc-dev, linux-media

When CONFIG_PWM is not set make will still descend into the pwm
directory but nothing will be built. This produces unneeded build
artifacts and messages in addition to slowing the build. Fix this here.

Signed-off-by: Andrew F. Davis <afd@ti.com>
---
 drivers/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/Makefile b/drivers/Makefile
index 060026a02f59..0d0ed1b727d1 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -13,7 +13,7 @@ obj-$(CONFIG_GENERIC_PHY)	+= phy/
 # GPIO must come after pinctrl as gpios may need to mux pins etc
 obj-$(CONFIG_PINCTRL)		+= pinctrl/
 obj-$(CONFIG_GPIOLIB)		+= gpio/
-obj-y				+= pwm/
+obj-$(CONFIG_PWM)		+= pwm/
 obj-$(CONFIG_PCI)		+= pci/
 obj-$(CONFIG_PARISC)		+= parisc/
 obj-$(CONFIG_RAPIDIO)		+= rapidio/
-- 
2.11.0

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

* [PATCH v2 1/6] pwm: Only descend into pwm directory when CONFIG_PWM is set
@ 2017-01-05 21:01   ` Andrew F. Davis
  0 siblings, 0 replies; 20+ messages in thread
From: Andrew F. Davis @ 2017-01-05 21:01 UTC (permalink / raw)
  To: Russell King, Miguel Ojeda Sandonis, Wolfram Sang,
	Richard Purdie, Benjamin Herrenschmidt, Mauro Carvalho Chehab,
	Ulf Hansson, Lauro Ramos Venancio, Aloisio Almeida Jr,
	Samuel Ortiz, Ingo Molnar
  Cc: linuxppc-dev, linux-media, linux-wireless, linux-pwm,
	linux-kernel, Andrew F . Davis

When CONFIG_PWM is not set make will still descend into the pwm
directory but nothing will be built. This produces unneeded build
artifacts and messages in addition to slowing the build. Fix this here.

Signed-off-by: Andrew F. Davis <afd@ti.com>
---
 drivers/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/Makefile b/drivers/Makefile
index 060026a02f59..0d0ed1b727d1 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -13,7 +13,7 @@ obj-$(CONFIG_GENERIC_PHY)	+= phy/
 # GPIO must come after pinctrl as gpios may need to mux pins etc
 obj-$(CONFIG_PINCTRL)		+= pinctrl/
 obj-$(CONFIG_GPIOLIB)		+= gpio/
-obj-y				+= pwm/
+obj-$(CONFIG_PWM)		+= pwm/
 obj-$(CONFIG_PCI)		+= pci/
 obj-$(CONFIG_PARISC)		+= parisc/
 obj-$(CONFIG_RAPIDIO)		+= rapidio/
-- 
2.11.0

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

* [PATCH v2 2/6] amba: Only descend into amba directory when CONFIG_ARM_AMBA is set
  2017-01-05 21:01 ` Andrew F. Davis
@ 2017-01-05 21:01   ` Andrew F. Davis
  -1 siblings, 0 replies; 20+ messages in thread
From: Andrew F. Davis @ 2017-01-05 21:01 UTC (permalink / raw)
  To: Russell King, Miguel Ojeda Sandonis, Wolfram Sang,
	Richard Purdie, Benjamin Herrenschmidt, Mauro Carvalho Chehab,
	Ulf Hansson, Lauro Ramos Venancio, Aloisio Almeida Jr,
	Samuel Ortiz, Ingo Molnar
  Cc: linux-pwm, linux-wireless, linux-kernel, Andrew F . Davis,
	linuxppc-dev, linux-media

When CONFIG_ARM_AMBA is not set make will still descend into the amba
directory but nothing will be built. This produces unneeded build
artifacts and messages in addition to slowing the build. Fix this here.

Signed-off-by: Andrew F. Davis <afd@ti.com>
---
 drivers/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/Makefile b/drivers/Makefile
index 0d0ed1b727d1..b3adeb421000 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -28,7 +28,7 @@ obj-$(CONFIG_SFI)		+= sfi/
 # PnP must come after ACPI since it will eventually need to check if acpi
 # was used and do nothing if so
 obj-$(CONFIG_PNP)		+= pnp/
-obj-y				+= amba/
+obj-$(CONFIG_ARM_AMBA)		+= amba/
 
 obj-y				+= clk/
 # Many drivers will want to use DMA so this has to be made available
-- 
2.11.0

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

* [PATCH v2 2/6] amba: Only descend into amba directory when CONFIG_ARM_AMBA is set
@ 2017-01-05 21:01   ` Andrew F. Davis
  0 siblings, 0 replies; 20+ messages in thread
From: Andrew F. Davis @ 2017-01-05 21:01 UTC (permalink / raw)
  To: Russell King, Miguel Ojeda Sandonis, Wolfram Sang,
	Richard Purdie, Benjamin Herrenschmidt, Mauro Carvalho Chehab,
	Ulf Hansson, Lauro Ramos Venancio, Aloisio Almeida Jr,
	Samuel Ortiz, Ingo Molnar
  Cc: linuxppc-dev, linux-media, linux-wireless, linux-pwm,
	linux-kernel, Andrew F . Davis

When CONFIG_ARM_AMBA is not set make will still descend into the amba
directory but nothing will be built. This produces unneeded build
artifacts and messages in addition to slowing the build. Fix this here.

Signed-off-by: Andrew F. Davis <afd@ti.com>
---
 drivers/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/Makefile b/drivers/Makefile
index 0d0ed1b727d1..b3adeb421000 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -28,7 +28,7 @@ obj-$(CONFIG_SFI)		+= sfi/
 # PnP must come after ACPI since it will eventually need to check if acpi
 # was used and do nothing if so
 obj-$(CONFIG_PNP)		+= pnp/
-obj-y				+= amba/
+obj-$(CONFIG_ARM_AMBA)		+= amba/
 
 obj-y				+= clk/
 # Many drivers will want to use DMA so this has to be made available
-- 
2.11.0

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

* [PATCH v2 3/6] NFC: Only descend into nfc directory when CONFIG_NFC is set
  2017-01-05 21:01 ` Andrew F. Davis
@ 2017-01-05 21:01   ` Andrew F. Davis
  -1 siblings, 0 replies; 20+ messages in thread
From: Andrew F. Davis @ 2017-01-05 21:01 UTC (permalink / raw)
  To: Russell King, Miguel Ojeda Sandonis, Wolfram Sang,
	Richard Purdie, Benjamin Herrenschmidt, Mauro Carvalho Chehab,
	Ulf Hansson, Lauro Ramos Venancio, Aloisio Almeida Jr,
	Samuel Ortiz, Ingo Molnar
  Cc: linux-pwm, linux-wireless, linux-kernel, Andrew F . Davis,
	linuxppc-dev, linux-media

When CONFIG_NFC is not set make will still descend into the nfc
directory but nothing will be built. This produces unneeded build
artifacts and messages in addition to slowing the build. Fix this here.

Signed-off-by: Andrew F. Davis <afd@ti.com>
---
 drivers/Makefile | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/Makefile b/drivers/Makefile
index b3adeb421000..f47f23cf817a 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -66,7 +66,11 @@ obj-$(CONFIG_FB_INTEL)          += video/fbdev/intelfb/
 
 obj-$(CONFIG_PARPORT)		+= parport/
 obj-$(CONFIG_NVM)		+= lightnvm/
-obj-y				+= base/ block/ misc/ mfd/ nfc/
+obj-y				+= base/
+obj-y				+= block/
+obj-y				+= misc/
+obj-y				+= mfd/
+obj-$(CONFIG_NFC)		+= nfc/
 obj-$(CONFIG_LIBNVDIMM)		+= nvdimm/
 obj-$(CONFIG_DEV_DAX)		+= dax/
 obj-$(CONFIG_DMA_SHARED_BUFFER) += dma-buf/
-- 
2.11.0

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

* [PATCH v2 3/6] NFC: Only descend into nfc directory when CONFIG_NFC is set
@ 2017-01-05 21:01   ` Andrew F. Davis
  0 siblings, 0 replies; 20+ messages in thread
From: Andrew F. Davis @ 2017-01-05 21:01 UTC (permalink / raw)
  To: Russell King, Miguel Ojeda Sandonis, Wolfram Sang,
	Richard Purdie, Benjamin Herrenschmidt, Mauro Carvalho Chehab,
	Ulf Hansson, Lauro Ramos Venancio, Aloisio Almeida Jr,
	Samuel Ortiz, Ingo Molnar
  Cc: linuxppc-dev, linux-media, linux-wireless, linux-pwm,
	linux-kernel, Andrew F . Davis

When CONFIG_NFC is not set make will still descend into the nfc
directory but nothing will be built. This produces unneeded build
artifacts and messages in addition to slowing the build. Fix this here.

Signed-off-by: Andrew F. Davis <afd@ti.com>
---
 drivers/Makefile | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/Makefile b/drivers/Makefile
index b3adeb421000..f47f23cf817a 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -66,7 +66,11 @@ obj-$(CONFIG_FB_INTEL)          += video/fbdev/intelfb/
 
 obj-$(CONFIG_PARPORT)		+= parport/
 obj-$(CONFIG_NVM)		+= lightnvm/
-obj-y				+= base/ block/ misc/ mfd/ nfc/
+obj-y				+= base/
+obj-y				+= block/
+obj-y				+= misc/
+obj-y				+= mfd/
+obj-$(CONFIG_NFC)		+= nfc/
 obj-$(CONFIG_LIBNVDIMM)		+= nvdimm/
 obj-$(CONFIG_DEV_DAX)		+= dax/
 obj-$(CONFIG_DMA_SHARED_BUFFER) += dma-buf/
-- 
2.11.0

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

* [PATCH v2 4/6] macintosh: Only descend into directory when CONFIG_MACINTOSH_DRIVERS is set
  2017-01-05 21:01 ` Andrew F. Davis
@ 2017-01-05 21:01   ` Andrew F. Davis
  -1 siblings, 0 replies; 20+ messages in thread
From: Andrew F. Davis @ 2017-01-05 21:01 UTC (permalink / raw)
  To: Russell King, Miguel Ojeda Sandonis, Wolfram Sang,
	Richard Purdie, Benjamin Herrenschmidt, Mauro Carvalho Chehab,
	Ulf Hansson, Lauro Ramos Venancio, Aloisio Almeida Jr,
	Samuel Ortiz, Ingo Molnar
  Cc: linux-pwm, linux-wireless, linux-kernel, Andrew F . Davis,
	linuxppc-dev, linux-media

When CONFIG_MACINTOSH_DRIVERS is not set make will still descend into the
macintosh directory but nothing will be built. This produces unneeded
build artifacts and messages in addition to slowing the build.
Fix this here.

Signed-off-by: Andrew F. Davis <afd@ti.com>
---
 drivers/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/Makefile b/drivers/Makefile
index f47f23cf817a..0823730bc50b 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -75,7 +75,7 @@ obj-$(CONFIG_LIBNVDIMM)		+= nvdimm/
 obj-$(CONFIG_DEV_DAX)		+= dax/
 obj-$(CONFIG_DMA_SHARED_BUFFER) += dma-buf/
 obj-$(CONFIG_NUBUS)		+= nubus/
-obj-y				+= macintosh/
+obj-$(CONFIG_MACINTOSH_DRIVERS)	+= macintosh/
 obj-$(CONFIG_IDE)		+= ide/
 obj-$(CONFIG_SCSI)		+= scsi/
 obj-y				+= nvme/
-- 
2.11.0

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

* [PATCH v2 4/6] macintosh: Only descend into directory when CONFIG_MACINTOSH_DRIVERS is set
@ 2017-01-05 21:01   ` Andrew F. Davis
  0 siblings, 0 replies; 20+ messages in thread
From: Andrew F. Davis @ 2017-01-05 21:01 UTC (permalink / raw)
  To: Russell King, Miguel Ojeda Sandonis, Wolfram Sang,
	Richard Purdie, Benjamin Herrenschmidt, Mauro Carvalho Chehab,
	Ulf Hansson, Lauro Ramos Venancio, Aloisio Almeida Jr,
	Samuel Ortiz, Ingo Molnar
  Cc: linuxppc-dev, linux-media, linux-wireless, linux-pwm,
	linux-kernel, Andrew F . Davis

When CONFIG_MACINTOSH_DRIVERS is not set make will still descend into the
macintosh directory but nothing will be built. This produces unneeded
build artifacts and messages in addition to slowing the build.
Fix this here.

Signed-off-by: Andrew F. Davis <afd@ti.com>
---
 drivers/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/Makefile b/drivers/Makefile
index f47f23cf817a..0823730bc50b 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -75,7 +75,7 @@ obj-$(CONFIG_LIBNVDIMM)		+= nvdimm/
 obj-$(CONFIG_DEV_DAX)		+= dax/
 obj-$(CONFIG_DMA_SHARED_BUFFER) += dma-buf/
 obj-$(CONFIG_NUBUS)		+= nubus/
-obj-y				+= macintosh/
+obj-$(CONFIG_MACINTOSH_DRIVERS)	+= macintosh/
 obj-$(CONFIG_IDE)		+= ide/
 obj-$(CONFIG_SCSI)		+= scsi/
 obj-y				+= nvme/
-- 
2.11.0

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

* [PATCH v2 5/6] auxdisplay: Only descend into directory when CONFIG_AUXDISPLAY is set
  2017-01-05 21:01 ` Andrew F. Davis
@ 2017-01-05 21:01   ` Andrew F. Davis
  -1 siblings, 0 replies; 20+ messages in thread
From: Andrew F. Davis @ 2017-01-05 21:01 UTC (permalink / raw)
  To: Russell King, Miguel Ojeda Sandonis, Wolfram Sang,
	Richard Purdie, Benjamin Herrenschmidt, Mauro Carvalho Chehab,
	Ulf Hansson, Lauro Ramos Venancio, Aloisio Almeida Jr,
	Samuel Ortiz, Ingo Molnar
  Cc: linux-pwm, linux-wireless, linux-kernel, Andrew F . Davis,
	linuxppc-dev, linux-media

When CONFIG_AUXDISPLAY is not set make will still descend into the
auxdisplay directory but nothing will be built. This produces unneeded
build artifacts and messages in addition to slowing the build.
Fix this here.

Signed-off-by: Andrew F. Davis <afd@ti.com>
---
 drivers/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/Makefile b/drivers/Makefile
index 0823730bc50b..59d6e0f5643d 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -92,7 +92,7 @@ obj-y				+= firewire/
 obj-$(CONFIG_UIO)		+= uio/
 obj-$(CONFIG_VFIO)		+= vfio/
 obj-y				+= cdrom/
-obj-y				+= auxdisplay/
+obj-$(CONFIG_AUXDISPLAY)	+= auxdisplay/
 obj-$(CONFIG_PCCARD)		+= pcmcia/
 obj-$(CONFIG_DIO)		+= dio/
 obj-$(CONFIG_SBUS)		+= sbus/
-- 
2.11.0

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

* [PATCH v2 5/6] auxdisplay: Only descend into directory when CONFIG_AUXDISPLAY is set
@ 2017-01-05 21:01   ` Andrew F. Davis
  0 siblings, 0 replies; 20+ messages in thread
From: Andrew F. Davis @ 2017-01-05 21:01 UTC (permalink / raw)
  To: Russell King, Miguel Ojeda Sandonis, Wolfram Sang,
	Richard Purdie, Benjamin Herrenschmidt, Mauro Carvalho Chehab,
	Ulf Hansson, Lauro Ramos Venancio, Aloisio Almeida Jr,
	Samuel Ortiz, Ingo Molnar
  Cc: linuxppc-dev, linux-media, linux-wireless, linux-pwm,
	linux-kernel, Andrew F . Davis

When CONFIG_AUXDISPLAY is not set make will still descend into the
auxdisplay directory but nothing will be built. This produces unneeded
build artifacts and messages in addition to slowing the build.
Fix this here.

Signed-off-by: Andrew F. Davis <afd@ti.com>
---
 drivers/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/Makefile b/drivers/Makefile
index 0823730bc50b..59d6e0f5643d 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -92,7 +92,7 @@ obj-y				+= firewire/
 obj-$(CONFIG_UIO)		+= uio/
 obj-$(CONFIG_VFIO)		+= vfio/
 obj-y				+= cdrom/
-obj-y				+= auxdisplay/
+obj-$(CONFIG_AUXDISPLAY)	+= auxdisplay/
 obj-$(CONFIG_PCCARD)		+= pcmcia/
 obj-$(CONFIG_DIO)		+= dio/
 obj-$(CONFIG_SBUS)		+= sbus/
-- 
2.11.0

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

* [PATCH v2 6/6] [media] Only descend into directory when CONFIG_MEDIA_SUPPORT is set
  2017-01-05 21:01 ` Andrew F. Davis
@ 2017-01-05 21:01   ` Andrew F. Davis
  -1 siblings, 0 replies; 20+ messages in thread
From: Andrew F. Davis @ 2017-01-05 21:01 UTC (permalink / raw)
  To: Russell King, Miguel Ojeda Sandonis, Wolfram Sang,
	Richard Purdie, Benjamin Herrenschmidt, Mauro Carvalho Chehab,
	Ulf Hansson, Lauro Ramos Venancio, Aloisio Almeida Jr,
	Samuel Ortiz, Ingo Molnar
  Cc: linux-pwm, linux-wireless, linux-kernel, Andrew F . Davis,
	linuxppc-dev, linux-media

When CONFIG_MEDIA_SUPPORT is not set make will still descend into the
media directory but nothing will be built. This produces unneeded build
artifacts and messages in addition to slowing the build. Fix this here.

Signed-off-by: Andrew F. Davis <afd@ti.com>
---
 drivers/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/Makefile b/drivers/Makefile
index 59d6e0f5643d..9ccec4924ad1 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -109,7 +109,8 @@ obj-$(CONFIG_SERIO)		+= input/serio/
 obj-$(CONFIG_GAMEPORT)		+= input/gameport/
 obj-$(CONFIG_INPUT)		+= input/
 obj-$(CONFIG_RTC_LIB)		+= rtc/
-obj-y				+= i2c/ media/
+obj-y				+= i2c/
+obj-$(CONFIG_MEDIA_SUPPORT)	+= media/
 obj-$(CONFIG_PPS)		+= pps/
 obj-y				+= ptp/
 obj-$(CONFIG_W1)		+= w1/
-- 
2.11.0

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

* [PATCH v2 6/6] [media] Only descend into directory when CONFIG_MEDIA_SUPPORT is set
@ 2017-01-05 21:01   ` Andrew F. Davis
  0 siblings, 0 replies; 20+ messages in thread
From: Andrew F. Davis @ 2017-01-05 21:01 UTC (permalink / raw)
  To: Russell King, Miguel Ojeda Sandonis, Wolfram Sang,
	Richard Purdie, Benjamin Herrenschmidt, Mauro Carvalho Chehab,
	Ulf Hansson, Lauro Ramos Venancio, Aloisio Almeida Jr,
	Samuel Ortiz, Ingo Molnar
  Cc: linuxppc-dev, linux-media, linux-wireless, linux-pwm,
	linux-kernel, Andrew F . Davis

When CONFIG_MEDIA_SUPPORT is not set make will still descend into the
media directory but nothing will be built. This produces unneeded build
artifacts and messages in addition to slowing the build. Fix this here.

Signed-off-by: Andrew F. Davis <afd@ti.com>
---
 drivers/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/Makefile b/drivers/Makefile
index 59d6e0f5643d..9ccec4924ad1 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -109,7 +109,8 @@ obj-$(CONFIG_SERIO)		+= input/serio/
 obj-$(CONFIG_GAMEPORT)		+= input/gameport/
 obj-$(CONFIG_INPUT)		+= input/
 obj-$(CONFIG_RTC_LIB)		+= rtc/
-obj-y				+= i2c/ media/
+obj-y				+= i2c/
+obj-$(CONFIG_MEDIA_SUPPORT)	+= media/
 obj-$(CONFIG_PPS)		+= pps/
 obj-y				+= ptp/
 obj-$(CONFIG_W1)		+= w1/
-- 
2.11.0

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

* Re: [PATCH v2 6/6] [media] Only descend into directory when CONFIG_MEDIA_SUPPORT is set
@ 2017-01-05 21:42     ` Arnd Bergmann
  0 siblings, 0 replies; 20+ messages in thread
From: Arnd Bergmann @ 2017-01-05 21:42 UTC (permalink / raw)
  To: linuxppc-dev
  Cc: Andrew F. Davis, Russell King, Miguel Ojeda Sandonis,
	Wolfram Sang, Richard Purdie, Benjamin Herrenschmidt,
	Mauro Carvalho Chehab, Ulf Hansson, Lauro Ramos Venancio,
	Aloisio Almeida Jr, Samuel Ortiz, Ingo Molnar, linux-pwm,
	linux-wireless, linux-kernel, linux-media

On Thursday, January 5, 2017 3:01:58 PM CET Andrew F. Davis wrote:
> @@ -109,7 +109,8 @@ obj-$(CONFIG_SERIO)         += input/serio/
>  obj-$(CONFIG_GAMEPORT)         += input/gameport/
>  obj-$(CONFIG_INPUT)            += input/
>  obj-$(CONFIG_RTC_LIB)          += rtc/
> -obj-y                          += i2c/ media/
> +obj-y                          += i2c/
> +obj-$(CONFIG_MEDIA_SUPPORT)    += media/
>  obj-$(CONFIG_PPS)              += pps/
>  obj-y                          += ptp/
>  obj-$(CONFIG_W1)               += w1/
> 

This one seems wrong: if CONFIG_MEDIA_SUPPORT=m, but some I2C drivers
inside of drivers/media/ are built-in, we will fail to enter the directory,
see drivers/media/Makefile.

I checked the other five patches in the series as well, they all look
ok to me.

	Arnd

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

* Re: [PATCH v2 6/6] [media] Only descend into directory when CONFIG_MEDIA_SUPPORT is set
@ 2017-01-05 21:42     ` Arnd Bergmann
  0 siblings, 0 replies; 20+ messages in thread
From: Arnd Bergmann @ 2017-01-05 21:42 UTC (permalink / raw)
  To: linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ
  Cc: Andrew F. Davis, Russell King, Miguel Ojeda Sandonis,
	Wolfram Sang, Richard Purdie, Benjamin Herrenschmidt,
	Mauro Carvalho Chehab, Ulf Hansson, Lauro Ramos Venancio,
	Aloisio Almeida Jr, Samuel Ortiz, Ingo Molnar,
	linux-pwm-u79uwXL29TY76Z2rM5mHXA,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-media-u79uwXL29TY76Z2rM5mHXA

On Thursday, January 5, 2017 3:01:58 PM CET Andrew F. Davis wrote:
> @@ -109,7 +109,8 @@ obj-$(CONFIG_SERIO)         += input/serio/
>  obj-$(CONFIG_GAMEPORT)         += input/gameport/
>  obj-$(CONFIG_INPUT)            += input/
>  obj-$(CONFIG_RTC_LIB)          += rtc/
> -obj-y                          += i2c/ media/
> +obj-y                          += i2c/
> +obj-$(CONFIG_MEDIA_SUPPORT)    += media/
>  obj-$(CONFIG_PPS)              += pps/
>  obj-y                          += ptp/
>  obj-$(CONFIG_W1)               += w1/
> 

This one seems wrong: if CONFIG_MEDIA_SUPPORT=m, but some I2C drivers
inside of drivers/media/ are built-in, we will fail to enter the directory,
see drivers/media/Makefile.

I checked the other five patches in the series as well, they all look
ok to me.

	Arnd

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

* Re: [PATCH v2 6/6] [media] Only descend into directory when CONFIG_MEDIA_SUPPORT is set
  2017-01-05 21:42     ` Arnd Bergmann
@ 2017-01-05 22:35       ` Andrew F. Davis
  -1 siblings, 0 replies; 20+ messages in thread
From: Andrew F. Davis @ 2017-01-05 22:35 UTC (permalink / raw)
  To: Arnd Bergmann, linuxppc-dev
  Cc: Russell King, Miguel Ojeda Sandonis, Wolfram Sang,
	Richard Purdie, Benjamin Herrenschmidt, Mauro Carvalho Chehab,
	Ulf Hansson, Lauro Ramos Venancio, Aloisio Almeida Jr,
	Samuel Ortiz, Ingo Molnar, linux-pwm, linux-wireless,
	linux-kernel, linux-media

On 01/05/2017 03:42 PM, Arnd Bergmann wrote:
> On Thursday, January 5, 2017 3:01:58 PM CET Andrew F. Davis wrote:
>> @@ -109,7 +109,8 @@ obj-$(CONFIG_SERIO)         += input/serio/
>>  obj-$(CONFIG_GAMEPORT)         += input/gameport/
>>  obj-$(CONFIG_INPUT)            += input/
>>  obj-$(CONFIG_RTC_LIB)          += rtc/
>> -obj-y                          += i2c/ media/
>> +obj-y                          += i2c/
>> +obj-$(CONFIG_MEDIA_SUPPORT)    += media/
>>  obj-$(CONFIG_PPS)              += pps/
>>  obj-y                          += ptp/
>>  obj-$(CONFIG_W1)               += w1/
>>
> 
> This one seems wrong: if CONFIG_MEDIA_SUPPORT=m, but some I2C drivers
> inside of drivers/media/ are built-in, we will fail to enter the directory,
> see drivers/media/Makefile.

Not sure if I see this, it looks like everything in drivers/media/
depends on CONFIG_MEDIA_SUPPORT (directly or indirectly). If
CONFIG_MEDIA_SUPPORT is =m then all dependents should be locked out of
being built-in.

Any bool symbol that controls compilation of source that depends on a
tristate symbol is broken and should be fixed anyway.

> 
> I checked the other five patches in the series as well, they all look
> ok to me.
> 
> 	Arnd
> 

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

* Re: [PATCH v2 6/6] [media] Only descend into directory when CONFIG_MEDIA_SUPPORT is set
@ 2017-01-05 22:35       ` Andrew F. Davis
  0 siblings, 0 replies; 20+ messages in thread
From: Andrew F. Davis @ 2017-01-05 22:35 UTC (permalink / raw)
  To: Arnd Bergmann, linuxppc-dev
  Cc: Russell King, Miguel Ojeda Sandonis, Wolfram Sang,
	Richard Purdie, Benjamin Herrenschmidt, Mauro Carvalho Chehab,
	Ulf Hansson, Lauro Ramos Venancio, Aloisio Almeida Jr,
	Samuel Ortiz, Ingo Molnar, linux-pwm, linux-wireless,
	linux-kernel, linux-media

On 01/05/2017 03:42 PM, Arnd Bergmann wrote:
> On Thursday, January 5, 2017 3:01:58 PM CET Andrew F. Davis wrote:
>> @@ -109,7 +109,8 @@ obj-$(CONFIG_SERIO)         += input/serio/
>>  obj-$(CONFIG_GAMEPORT)         += input/gameport/
>>  obj-$(CONFIG_INPUT)            += input/
>>  obj-$(CONFIG_RTC_LIB)          += rtc/
>> -obj-y                          += i2c/ media/
>> +obj-y                          += i2c/
>> +obj-$(CONFIG_MEDIA_SUPPORT)    += media/
>>  obj-$(CONFIG_PPS)              += pps/
>>  obj-y                          += ptp/
>>  obj-$(CONFIG_W1)               += w1/
>>
> 
> This one seems wrong: if CONFIG_MEDIA_SUPPORT=m, but some I2C drivers
> inside of drivers/media/ are built-in, we will fail to enter the directory,
> see drivers/media/Makefile.

Not sure if I see this, it looks like everything in drivers/media/
depends on CONFIG_MEDIA_SUPPORT (directly or indirectly). If
CONFIG_MEDIA_SUPPORT is =m then all dependents should be locked out of
being built-in.

Any bool symbol that controls compilation of source that depends on a
tristate symbol is broken and should be fixed anyway.

> 
> I checked the other five patches in the series as well, they all look
> ok to me.
> 
> 	Arnd
> 

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

* Re: [PATCH v2 6/6] [media] Only descend into directory when CONFIG_MEDIA_SUPPORT is set
@ 2017-01-05 23:12         ` Arnd Bergmann
  0 siblings, 0 replies; 20+ messages in thread
From: Arnd Bergmann @ 2017-01-05 23:12 UTC (permalink / raw)
  To: Andrew F. Davis
  Cc: linuxppc-dev, Russell King, Miguel Ojeda Sandonis, Wolfram Sang,
	Richard Purdie, Benjamin Herrenschmidt, Mauro Carvalho Chehab,
	Ulf Hansson, Lauro Ramos Venancio, Aloisio Almeida Jr,
	Samuel Ortiz, Ingo Molnar, linux-pwm, linux-wireless,
	linux-kernel, linux-media

On Thursday, January 5, 2017 4:35:33 PM CET Andrew F. Davis wrote:
> On 01/05/2017 03:42 PM, Arnd Bergmann wrote:
> > On Thursday, January 5, 2017 3:01:58 PM CET Andrew F. Davis wrote:
> >> @@ -109,7 +109,8 @@ obj-$(CONFIG_SERIO)         += input/serio/
> >>  obj-$(CONFIG_GAMEPORT)         += input/gameport/
> >>  obj-$(CONFIG_INPUT)            += input/
> >>  obj-$(CONFIG_RTC_LIB)          += rtc/
> >> -obj-y                          += i2c/ media/
> >> +obj-y                          += i2c/
> >> +obj-$(CONFIG_MEDIA_SUPPORT)    += media/
> >>  obj-$(CONFIG_PPS)              += pps/
> >>  obj-y                          += ptp/
> >>  obj-$(CONFIG_W1)               += w1/
> >>
> > 
> > This one seems wrong: if CONFIG_MEDIA_SUPPORT=m, but some I2C drivers
> > inside of drivers/media/ are built-in, we will fail to enter the directory,
> > see drivers/media/Makefile.
> 
> Not sure if I see this, it looks like everything in drivers/media/
> depends on CONFIG_MEDIA_SUPPORT (directly or indirectly). If
> CONFIG_MEDIA_SUPPORT is =m then all dependents should be locked out of
> being built-in.
> 
> Any bool symbol that controls compilation of source that depends on a
> tristate symbol is broken and should be fixed anyway.

I don't think it's this easy, we have a couple of cases where that doesn't
work. I have not looked at the media example in detail, but at least it
looks intentional.

Note that drivers/media is rather creative with expressing dependencies.

	Arnd

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

* Re: [PATCH v2 6/6] [media] Only descend into directory when CONFIG_MEDIA_SUPPORT is set
@ 2017-01-05 23:12         ` Arnd Bergmann
  0 siblings, 0 replies; 20+ messages in thread
From: Arnd Bergmann @ 2017-01-05 23:12 UTC (permalink / raw)
  To: Andrew F. Davis
  Cc: linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ, Russell King,
	Miguel Ojeda Sandonis, Wolfram Sang, Richard Purdie,
	Benjamin Herrenschmidt, Mauro Carvalho Chehab, Ulf Hansson,
	Lauro Ramos Venancio, Aloisio Almeida Jr, Samuel Ortiz,
	Ingo Molnar, linux-pwm-u79uwXL29TY76Z2rM5mHXA,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-media-u79uwXL29TY76Z2rM5mHXA

On Thursday, January 5, 2017 4:35:33 PM CET Andrew F. Davis wrote:
> On 01/05/2017 03:42 PM, Arnd Bergmann wrote:
> > On Thursday, January 5, 2017 3:01:58 PM CET Andrew F. Davis wrote:
> >> @@ -109,7 +109,8 @@ obj-$(CONFIG_SERIO)         += input/serio/
> >>  obj-$(CONFIG_GAMEPORT)         += input/gameport/
> >>  obj-$(CONFIG_INPUT)            += input/
> >>  obj-$(CONFIG_RTC_LIB)          += rtc/
> >> -obj-y                          += i2c/ media/
> >> +obj-y                          += i2c/
> >> +obj-$(CONFIG_MEDIA_SUPPORT)    += media/
> >>  obj-$(CONFIG_PPS)              += pps/
> >>  obj-y                          += ptp/
> >>  obj-$(CONFIG_W1)               += w1/
> >>
> > 
> > This one seems wrong: if CONFIG_MEDIA_SUPPORT=m, but some I2C drivers
> > inside of drivers/media/ are built-in, we will fail to enter the directory,
> > see drivers/media/Makefile.
> 
> Not sure if I see this, it looks like everything in drivers/media/
> depends on CONFIG_MEDIA_SUPPORT (directly or indirectly). If
> CONFIG_MEDIA_SUPPORT is =m then all dependents should be locked out of
> being built-in.
> 
> Any bool symbol that controls compilation of source that depends on a
> tristate symbol is broken and should be fixed anyway.

I don't think it's this easy, we have a couple of cases where that doesn't
work. I have not looked at the media example in detail, but at least it
looks intentional.

Note that drivers/media is rather creative with expressing dependencies.

	Arnd

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

end of thread, other threads:[~2017-01-05 23:13 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-05 21:01 [PATCH v2 0/6] Remove unneeded build directory traversals Andrew F. Davis
2017-01-05 21:01 ` Andrew F. Davis
2017-01-05 21:01 ` [PATCH v2 1/6] pwm: Only descend into pwm directory when CONFIG_PWM is set Andrew F. Davis
2017-01-05 21:01   ` Andrew F. Davis
2017-01-05 21:01 ` [PATCH v2 2/6] amba: Only descend into amba directory when CONFIG_ARM_AMBA " Andrew F. Davis
2017-01-05 21:01   ` Andrew F. Davis
2017-01-05 21:01 ` [PATCH v2 3/6] NFC: Only descend into nfc directory when CONFIG_NFC " Andrew F. Davis
2017-01-05 21:01   ` Andrew F. Davis
2017-01-05 21:01 ` [PATCH v2 4/6] macintosh: Only descend into directory when CONFIG_MACINTOSH_DRIVERS " Andrew F. Davis
2017-01-05 21:01   ` Andrew F. Davis
2017-01-05 21:01 ` [PATCH v2 5/6] auxdisplay: Only descend into directory when CONFIG_AUXDISPLAY " Andrew F. Davis
2017-01-05 21:01   ` Andrew F. Davis
2017-01-05 21:01 ` [PATCH v2 6/6] [media] Only descend into directory when CONFIG_MEDIA_SUPPORT " Andrew F. Davis
2017-01-05 21:01   ` Andrew F. Davis
2017-01-05 21:42   ` Arnd Bergmann
2017-01-05 21:42     ` Arnd Bergmann
2017-01-05 22:35     ` Andrew F. Davis
2017-01-05 22:35       ` Andrew F. Davis
2017-01-05 23:12       ` Arnd Bergmann
2017-01-05 23:12         ` Arnd Bergmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.