All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/5] Remove unneeded build directory traversals
@ 2017-12-05 19:44 ` Andrew F. Davis
  0 siblings, 0 replies; 12+ messages in thread
From: Andrew F. Davis @ 2017-12-05 19:44 UTC (permalink / raw)
  To: Thierry Reding, Russell King, Samuel Ortiz,
	Benjamin Herrenschmidt, Miguel Ojeda Sandonis
  Cc: linux-pwm, kernel-janitors, linux-wireless, linux-kernel,
	Andrew F . Davis, linuxppc-dev

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 v3:
 - Removed patches already taken by maintainers
 - Rebased on v4.15-rc1 (no changes needed)

Changes from v2:
 - Removed patches that would not work
 - Rebased on v4.11-rc1 (no changes needed)

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

Andrew F. Davis (5):
  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

 drivers/Makefile | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

-- 
2.15.0

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

* [PATCH v4 0/5] Remove unneeded build directory traversals
@ 2017-12-05 19:44 ` Andrew F. Davis
  0 siblings, 0 replies; 12+ messages in thread
From: Andrew F. Davis @ 2017-12-05 19:44 UTC (permalink / raw)
  To: Thierry Reding, Russell King, Samuel Ortiz,
	Benjamin Herrenschmidt, Miguel Ojeda Sandonis
  Cc: linuxppc-dev, linux-wireless, linux-pwm, kernel-janitors,
	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 v3:
 - Removed patches already taken by maintainers
 - Rebased on v4.15-rc1 (no changes needed)

Changes from v2:
 - Removed patches that would not work
 - Rebased on v4.11-rc1 (no changes needed)

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

Andrew F. Davis (5):
  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

 drivers/Makefile | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

-- 
2.15.0

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

* [PATCH v4 1/5] pwm: Only descend into pwm directory when CONFIG_PWM is set
  2017-12-05 19:44 ` Andrew F. Davis
@ 2017-12-05 19:44   ` Andrew F. Davis
  -1 siblings, 0 replies; 12+ messages in thread
From: Andrew F. Davis @ 2017-12-05 19:44 UTC (permalink / raw)
  To: Thierry Reding, Russell King, Samuel Ortiz,
	Benjamin Herrenschmidt, Miguel Ojeda Sandonis
  Cc: linux-pwm, kernel-janitors, linux-wireless, linux-kernel,
	Andrew F . Davis, linuxppc-dev

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 1d034b680431..82ff1fc5f724 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -14,7 +14,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_PCI_ENDPOINT)	+= pci/endpoint/
-- 
2.15.0

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

* [PATCH v4 1/5] pwm: Only descend into pwm directory when CONFIG_PWM is set
@ 2017-12-05 19:44   ` Andrew F. Davis
  0 siblings, 0 replies; 12+ messages in thread
From: Andrew F. Davis @ 2017-12-05 19:44 UTC (permalink / raw)
  To: Thierry Reding, Russell King, Samuel Ortiz,
	Benjamin Herrenschmidt, Miguel Ojeda Sandonis
  Cc: linuxppc-dev, linux-wireless, linux-pwm, kernel-janitors,
	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 1d034b680431..82ff1fc5f724 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -14,7 +14,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_PCI_ENDPOINT)	+= pci/endpoint/
-- 
2.15.0

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

* [PATCH v4 2/5] amba: Only descend into amba directory when CONFIG_ARM_AMBA is set
  2017-12-05 19:44 ` Andrew F. Davis
@ 2017-12-05 19:44   ` Andrew F. Davis
  -1 siblings, 0 replies; 12+ messages in thread
From: Andrew F. Davis @ 2017-12-05 19:44 UTC (permalink / raw)
  To: Thierry Reding, Russell King, Samuel Ortiz,
	Benjamin Herrenschmidt, Miguel Ojeda Sandonis
  Cc: linux-pwm, kernel-janitors, linux-wireless, linux-kernel,
	Andrew F . Davis, linuxppc-dev

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 82ff1fc5f724..ea2a8bb32818 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -34,7 +34,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.15.0

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

* [PATCH v4 2/5] amba: Only descend into amba directory when CONFIG_ARM_AMBA is set
@ 2017-12-05 19:44   ` Andrew F. Davis
  0 siblings, 0 replies; 12+ messages in thread
From: Andrew F. Davis @ 2017-12-05 19:44 UTC (permalink / raw)
  To: Thierry Reding, Russell King, Samuel Ortiz,
	Benjamin Herrenschmidt, Miguel Ojeda Sandonis
  Cc: linuxppc-dev, linux-wireless, linux-pwm, kernel-janitors,
	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 82ff1fc5f724..ea2a8bb32818 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -34,7 +34,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.15.0

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

* [PATCH v4 3/5] NFC: Only descend into nfc directory when CONFIG_NFC is set
  2017-12-05 19:44 ` Andrew F. Davis
@ 2017-12-05 19:44   ` Andrew F. Davis
  -1 siblings, 0 replies; 12+ messages in thread
From: Andrew F. Davis @ 2017-12-05 19:44 UTC (permalink / raw)
  To: Thierry Reding, Russell King, Samuel Ortiz,
	Benjamin Herrenschmidt, Miguel Ojeda Sandonis
  Cc: linux-pwm, kernel-janitors, linux-wireless, linux-kernel,
	Andrew F . Davis, linuxppc-dev

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 ea2a8bb32818..de33bb24c935 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -72,7 +72,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_DAX)		+= dax/
 obj-$(CONFIG_DMA_SHARED_BUFFER) += dma-buf/
-- 
2.15.0

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

* [PATCH v4 3/5] NFC: Only descend into nfc directory when CONFIG_NFC is set
@ 2017-12-05 19:44   ` Andrew F. Davis
  0 siblings, 0 replies; 12+ messages in thread
From: Andrew F. Davis @ 2017-12-05 19:44 UTC (permalink / raw)
  To: Thierry Reding, Russell King, Samuel Ortiz,
	Benjamin Herrenschmidt, Miguel Ojeda Sandonis
  Cc: linuxppc-dev, linux-wireless, linux-pwm, kernel-janitors,
	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 ea2a8bb32818..de33bb24c935 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -72,7 +72,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_DAX)		+= dax/
 obj-$(CONFIG_DMA_SHARED_BUFFER) += dma-buf/
-- 
2.15.0

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

* [PATCH v4 4/5] macintosh: Only descend into directory when CONFIG_MACINTOSH_DRIVERS is set
  2017-12-05 19:44 ` Andrew F. Davis
@ 2017-12-05 19:44   ` Andrew F. Davis
  -1 siblings, 0 replies; 12+ messages in thread
From: Andrew F. Davis @ 2017-12-05 19:44 UTC (permalink / raw)
  To: Thierry Reding, Russell King, Samuel Ortiz,
	Benjamin Herrenschmidt, Miguel Ojeda Sandonis
  Cc: linux-pwm, kernel-janitors, linux-wireless, linux-kernel,
	Andrew F . Davis, linuxppc-dev

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>
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
---
 drivers/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/Makefile b/drivers/Makefile
index de33bb24c935..cdf4509a2960 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -81,7 +81,7 @@ obj-$(CONFIG_LIBNVDIMM)		+= nvdimm/
 obj-$(CONFIG_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.15.0

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

* [PATCH v4 4/5] macintosh: Only descend into directory when CONFIG_MACINTOSH_DRIVERS is set
@ 2017-12-05 19:44   ` Andrew F. Davis
  0 siblings, 0 replies; 12+ messages in thread
From: Andrew F. Davis @ 2017-12-05 19:44 UTC (permalink / raw)
  To: Thierry Reding, Russell King, Samuel Ortiz,
	Benjamin Herrenschmidt, Miguel Ojeda Sandonis
  Cc: linuxppc-dev, linux-wireless, linux-pwm, kernel-janitors,
	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>
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
---
 drivers/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/Makefile b/drivers/Makefile
index de33bb24c935..cdf4509a2960 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -81,7 +81,7 @@ obj-$(CONFIG_LIBNVDIMM)		+= nvdimm/
 obj-$(CONFIG_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.15.0

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

* [PATCH v4 5/5] auxdisplay: Only descend into directory when CONFIG_AUXDISPLAY is set
  2017-12-05 19:44 ` Andrew F. Davis
@ 2017-12-05 19:44   ` Andrew F. Davis
  -1 siblings, 0 replies; 12+ messages in thread
From: Andrew F. Davis @ 2017-12-05 19:44 UTC (permalink / raw)
  To: Thierry Reding, Russell King, Samuel Ortiz,
	Benjamin Herrenschmidt, Miguel Ojeda Sandonis
  Cc: linux-pwm, kernel-janitors, linux-wireless, linux-kernel,
	Andrew F . Davis, linuxppc-dev

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 cdf4509a2960..03cd9ceb2b3c 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -98,7 +98,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.15.0

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

* [PATCH v4 5/5] auxdisplay: Only descend into directory when CONFIG_AUXDISPLAY is set
@ 2017-12-05 19:44   ` Andrew F. Davis
  0 siblings, 0 replies; 12+ messages in thread
From: Andrew F. Davis @ 2017-12-05 19:44 UTC (permalink / raw)
  To: Thierry Reding, Russell King, Samuel Ortiz,
	Benjamin Herrenschmidt, Miguel Ojeda Sandonis
  Cc: linuxppc-dev, linux-wireless, linux-pwm, kernel-janitors,
	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 cdf4509a2960..03cd9ceb2b3c 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -98,7 +98,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.15.0

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

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

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

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.