[PATCH v4 1/5] pwm: Only descend into pwm directory when CONFIG_PWM is set

2017-12-05 Thread 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 <a...@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



[PATCH v4 0/5] Remove unneeded build directory traversals

2017-12-05 Thread 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



[PATCH v4 4/5] macintosh: Only descend into directory when CONFIG_MACINTOSH_DRIVERS is set

2017-12-05 Thread 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 <a...@ti.com>
Acked-by: Michael Ellerman <m...@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



[PATCH v4 3/5] NFC: Only descend into nfc directory when CONFIG_NFC is set

2017-12-05 Thread 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 <a...@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



[PATCH v4 2/5] amba: Only descend into amba directory when CONFIG_ARM_AMBA is set

2017-12-05 Thread 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 <a...@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



[PATCH v4 5/5] auxdisplay: Only descend into directory when CONFIG_AUXDISPLAY is set

2017-12-05 Thread 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 <a...@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



Re: [PATCH v3 0/7] Remove unneeded build directory traversals

2017-03-15 Thread Andrew F. Davis
On 03/15/2017 04:03 PM, Arnd Bergmann wrote:
> On Wed, Mar 15, 2017 at 5:37 PM, Andrew F. Davis <a...@ti.com> wrote:
>> 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.
> 
> I didn't see anything wrong with the patches, and made sure that there
> are no tristate symbols controlling the subdirectory for anything that
> requires a built-in driver (which would cause a link failure).
> 
> I'm not sure about drivers/lguest, which has some special magic
> in its Makefile, it's possible that this now fails with CONFIG_LGUEST=m.
> 

lguest and mmc are the strange ones, so I put them last in the series in
case they did need to be dropped.

lguest was supposed to have been taken from v1:
https://lkml.org/lkml/2016/6/20/1086
but it looks like it didn't so I re-introduced it for v3.

mmc caught some 0-day build warnings but I never got to the bottom of them.

Anyway, I have no problem with these two being held back until the magic
in their Makefile is sorted out.

Thanks,
Andrew

>   Arnd
> 


[PATCH v3 4/7] macintosh: Only descend into directory when CONFIG_MACINTOSH_DRIVERS is set

2017-03-15 Thread 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 <a...@ti.com>
---
 drivers/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/Makefile b/drivers/Makefile
index 9cf52524ecab..cd92491bd76b 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -78,7 +78,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



[PATCH v3 6/7] lguest: Only descend into lguest directory when CONFIG_LGUEST is set

2017-03-15 Thread Andrew F. Davis
When CONFIG_LGUEST is not set make will still descend into the lguest
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 <a...@ti.com>
---
 drivers/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/Makefile b/drivers/Makefile
index 8a9ed5c59778..3d758020d248 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -126,7 +126,7 @@ obj-$(CONFIG_ACCESSIBILITY) += accessibility/
 obj-$(CONFIG_ISDN) += isdn/
 obj-$(CONFIG_EDAC) += edac/
 obj-$(CONFIG_EISA) += eisa/
-obj-y  += lguest/
+obj-$(CONFIG_LGUEST)   += lguest/
 obj-$(CONFIG_CPU_FREQ) += cpufreq/
 obj-$(CONFIG_CPU_IDLE) += cpuidle/
 obj-y  += mmc/
-- 
2.11.0



[PATCH v3 0/7] Remove unneeded build directory traversals

2017-03-15 Thread 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 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 (7):
  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
  lguest: Only descend into lguest directory when CONFIG_LGUEST is set
  mmc: Only descend into mmc directory when CONFIG_MMC is set

 drivers/Makefile | 18 +++---
 1 file changed, 11 insertions(+), 7 deletions(-)

-- 
2.11.0



[PATCH v3 7/7] mmc: Only descend into mmc directory when CONFIG_MMC is set

2017-03-15 Thread Andrew F. Davis
When CONFIG_MMC is not set make will still descend into the mmc
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 <a...@ti.com>
---
 drivers/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/Makefile b/drivers/Makefile
index 3d758020d248..03da7a38e989 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -129,7 +129,7 @@ obj-$(CONFIG_EISA)  += eisa/
 obj-$(CONFIG_LGUEST)   += lguest/
 obj-$(CONFIG_CPU_FREQ) += cpufreq/
 obj-$(CONFIG_CPU_IDLE) += cpuidle/
-obj-y  += mmc/
+obj-$(CONFIG_MMC)  += mmc/
 obj-$(CONFIG_MEMSTICK) += memstick/
 obj-$(CONFIG_NEW_LEDS) += leds/
 obj-$(CONFIG_INFINIBAND)   += infiniband/
-- 
2.11.0



[PATCH v3 3/7] NFC: Only descend into nfc directory when CONFIG_NFC is set

2017-03-15 Thread 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 <a...@ti.com>
---
 drivers/Makefile | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/Makefile b/drivers/Makefile
index 23712a92a89a..9cf52524ecab 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -69,7 +69,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



[PATCH v3 2/7] amba: Only descend into amba directory when CONFIG_ARM_AMBA is set

2017-03-15 Thread 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 <a...@ti.com>
---
 drivers/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/Makefile b/drivers/Makefile
index 00d86749a843..23712a92a89a 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -31,7 +31,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



[PATCH v3 1/7] pwm: Only descend into pwm directory when CONFIG_PWM is set

2017-03-15 Thread 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 <a...@ti.com>
---
 drivers/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/Makefile b/drivers/Makefile
index 2eced9afba53..00d86749a843 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/
 # PCI dwc controller drivers
 obj-y  += pci/dwc/
-- 
2.11.0



[PATCH v3 5/7] auxdisplay: Only descend into directory when CONFIG_AUXDISPLAY is set

2017-03-15 Thread 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 <a...@ti.com>
---
 drivers/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/Makefile b/drivers/Makefile
index cd92491bd76b..8a9ed5c59778 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -95,7 +95,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



Re: [PATCH v2 6/6] [media] Only descend into directory when CONFIG_MEDIA_SUPPORT is set

2017-01-05 Thread Andrew F. Davis
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
> 


[PATCH v2 4/6] macintosh: Only descend into directory when CONFIG_MACINTOSH_DRIVERS is set

2017-01-05 Thread 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 <a...@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



[PATCH v2 6/6] [media] Only descend into directory when CONFIG_MEDIA_SUPPORT is set

2017-01-05 Thread 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 <a...@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



[PATCH v2 5/6] auxdisplay: Only descend into directory when CONFIG_AUXDISPLAY is set

2017-01-05 Thread 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 <a...@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



[PATCH v2 3/6] NFC: Only descend into nfc directory when CONFIG_NFC is set

2017-01-05 Thread 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 <a...@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



[PATCH v2 0/6] Remove unneeded build directory traversals

2017-01-05 Thread 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



[PATCH v2 2/6] amba: Only descend into amba directory when CONFIG_ARM_AMBA is set

2017-01-05 Thread 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 <a...@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



[PATCH v2 1/6] pwm: Only descend into pwm directory when CONFIG_PWM is set

2017-01-05 Thread 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 <a...@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



Re: [PATCH] leds: Add no-op gpio_led_register_device when LED subsystem is disabled

2016-06-21 Thread Andrew F. Davis
On 06/21/2016 02:09 AM, Jacek Anaszewski wrote:
> Hi Andrew,
> 
> This patch doesn't apply, please rebase onto recent LED tree.
> 
> On 06/21/2016 12:13 AM, Andrew F. Davis wrote:
>> Some systems use 'gpio_led_register_device' to make an in-memory copy of
>> their LED device table so the original can be removed as .init.rodata.
>> When the LED subsystem is not enabled source in the led directory is not
>> built and so this function may be undefined. Fix this here.
>>
>> Signed-off-by: Andrew F. Davis <a...@ti.com>
>> ---
>>   include/linux/leds.h | 8 
>>   1 file changed, 8 insertions(+)
>>
>> diff --git a/include/linux/leds.h b/include/linux/leds.h
>> index d2b1306..a4a3da6 100644
>> --- a/include/linux/leds.h
>> +++ b/include/linux/leds.h
>> @@ -386,8 +386,16 @@ struct gpio_led_platform_data {
>>  unsigned long *delay_off);
> 
> Currently there is some stuff here, and in fact it has been for
> a long time.
> 
> Patch "[PATCH 12/12] leds: Only descend into leds directory when
> CONFIG_NEW_LEDS is set" also doesn't apply.
> What repository are you using?
> 

v4.7-rc4, it may not apply due to the surrounding lines being changed in
the other patches which may not be applied to your tree. It is a single
line change per patch so hopefully the merge conflict resolutions will
be trivial.

A better solution could have been getting an ack from each maintainer
and having someone pull the whole series into one tree, but parts have
already been picked so it may be a little late for that.

>>   };
>>
>> +#ifdef CONFIG_NEW_LEDS
>>   struct platform_device *gpio_led_register_device(
>>  int id, const struct gpio_led_platform_data *pdata);
>> +#else
>> +static inline struct platform_device *gpio_led_register_device(
>> +   int id, const struct gpio_led_platform_data *pdata)
>> +{
>> +   return 0;
>> +}
>> +#endif
>>
>>   enum cpu_led_event {
>>  CPU_LED_IDLE_START, /* CPU enters idle */
>>
> 
> 
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH] leds: Add no-op gpio_led_register_device when LED subsystem is disabled

2016-06-20 Thread Andrew F. Davis
Some systems use 'gpio_led_register_device' to make an in-memory copy of
their LED device table so the original can be removed as .init.rodata.
When the LED subsystem is not enabled source in the led directory is not
built and so this function may be undefined. Fix this here.

Signed-off-by: Andrew F. Davis <a...@ti.com>
---
 include/linux/leds.h | 8 
 1 file changed, 8 insertions(+)

diff --git a/include/linux/leds.h b/include/linux/leds.h
index d2b1306..a4a3da6 100644
--- a/include/linux/leds.h
+++ b/include/linux/leds.h
@@ -386,8 +386,16 @@ struct gpio_led_platform_data {
unsigned long *delay_off);
 };

+#ifdef CONFIG_NEW_LEDS
 struct platform_device *gpio_led_register_device(
int id, const struct gpio_led_platform_data *pdata);
+#else
+static inline struct platform_device *gpio_led_register_device(
+   int id, const struct gpio_led_platform_data *pdata)
+{
+   return 0;
+}
+#endif

 enum cpu_led_event {
CPU_LED_IDLE_START, /* CPU enters idle */
-- 
2.9.0
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH 12/12] leds: Only descend into leds directory when CONFIG_NEW_LEDS is set

2016-06-17 Thread Andrew F. Davis
On 06/15/2016 01:48 AM, Jacek Anaszewski wrote:
> Hi Andrew,
> 
> Thanks for the patch.
> 
> Please address the issue [1] raised by test bot and resubmit.
> 
> Thanks,
> Jacek Anaszewski
> 
> [1] https://lkml.org/lkml/2016/6/13/1091
> 

It looks like some systems use 'gpio_led_register_device' to make an
in-memory copy of their LED device table so the original can be removed
as .init.rodata. This doesn't necessarily depend on the LED subsystem
but it kind of seems useless when the rest of the subsystem is disabled.

One solution could be to use a dummy 'gpio_led_register_device' when the
subsystem is not enabled. Another is just to remove the five or so uses
of 'gpio_led_register_device' and have those systems register LED device
tables like other systems do.

If nether of these are acceptable then this patch can be dropped from
this series for now.

Thanks,
Andrew

> On 06/13/2016 10:02 PM, Andrew F. Davis wrote:
>> When CONFIG_NEW_LEDS is not set make will still descend into the leds
>> 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 <a...@ti.com>
>> ---
>>   drivers/Makefile | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/Makefile b/drivers/Makefile
>> index 567e32c..fa514d5 100644
>> --- a/drivers/Makefile
>> +++ b/drivers/Makefile
>> @@ -127,7 +127,7 @@ obj-$(CONFIG_CPU_FREQ)+= cpufreq/
>>   obj-$(CONFIG_CPU_IDLE)+= cpuidle/
>>   obj-$(CONFIG_MMC)+= mmc/
>>   obj-$(CONFIG_MEMSTICK)+= memstick/
>> -obj-y+= leds/
>> +obj-$(CONFIG_NEW_LEDS)+= leds/
>>   obj-$(CONFIG_INFINIBAND)+= infiniband/
>>   obj-$(CONFIG_SGI_SN)+= sn/
>>   obj-y+= firmware/
>>
> 
> 
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH] hsi: Build hsi_boardinfo.c into hsi core if enabled

2016-06-14 Thread Andrew F. Davis
If the HSI core is built as a module hsi_boardinfo may still
be built-in as its Kconfig type is bool, which can cause build
issues. Fix this by building this code into the HSI core when
enabled.

Reported-by: kbuild test robot <l...@intel.com>
Signed-off-by: Andrew F. Davis <a...@ti.com>
---
This build error seems to be due to Kconfig symbol CONFIG_HSI_BOARDINFO
being a bool but depending on a tristate (CONFIG_HSI). This is normally
okay when it is just a flag to enable a feature in source, but the
helper code file hsi_boardinfo.c is built as a separate entity when
enabled. This patch is probably how it was intended, and is more like
how others do this kind of thing.

This patch should be applied before the parent patch:

 drivers/hsi/Makefile  | 3 ++-
 drivers/hsi/{hsi.c => hsi_core.c} | 0
 2 files changed, 2 insertions(+), 1 deletion(-)
 rename drivers/hsi/{hsi.c => hsi_core.c} (100%)

diff --git a/drivers/hsi/Makefile b/drivers/hsi/Makefile
index 360371e..9694478 100644
--- a/drivers/hsi/Makefile
+++ b/drivers/hsi/Makefile
@@ -1,7 +1,8 @@
 #
 # Makefile for HSI
 #
-obj-$(CONFIG_HSI_BOARDINFO)+= hsi_boardinfo.o
 obj-$(CONFIG_HSI)  += hsi.o
+hsi-objs   := hsi_core.o
+hsi-$(CONFIG_HSI_BOARDINFO)+= hsi_boardinfo.o
 obj-y  += controllers/
 obj-y  += clients/
diff --git a/drivers/hsi/hsi.c b/drivers/hsi/hsi_core.c
similarity index 100%
rename from drivers/hsi/hsi.c
rename to drivers/hsi/hsi_core.c
-- 
2.8.3
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH 00/12] Remove unneeded build directory traversals

2016-06-13 Thread 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

Andrew F. Davis (12):
  gpio: Only descend into gpio directory when CONFIG_GPIOLIB is set
  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
  hsi: Only descend into hsi directory when CONFIG_HSI is set
  auxdisplay: Only descend into directory when CONFIG_AUXDISPLAY is set
  i2c: Only descend into i2c directory when CONFIG_I2C is set
  [media] Only descend into directory when CONFIG_MEDIA_SUPPORT is set
  lguest: Only descend into lguest directory when CONFIG_LGUEST is set
  mmc: Only descend into mmc directory when CONFIG_MMC is set
  leds: Only descend into leds directory when CONFIG_NEW_LEDS is set

 drivers/Makefile | 27 ---
 1 file changed, 16 insertions(+), 11 deletions(-)

-- 
2.8.3

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH 10/12] lguest: Only descend into lguest directory when CONFIG_LGUEST is set

2016-06-13 Thread Andrew F. Davis
When CONFIG_LGUEST is not set make will still descend into the lguest
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 <a...@ti.com>
---
 drivers/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/Makefile b/drivers/Makefile
index 19305e0..b178e2f 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -122,7 +122,7 @@ obj-$(CONFIG_ACCESSIBILITY) += accessibility/
 obj-$(CONFIG_ISDN) += isdn/
 obj-$(CONFIG_EDAC) += edac/
 obj-$(CONFIG_EISA) += eisa/
-obj-y  += lguest/
+obj-$(CONFIG_LGUEST)   += lguest/
 obj-$(CONFIG_CPU_FREQ) += cpufreq/
 obj-$(CONFIG_CPU_IDLE) += cpuidle/
 obj-y  += mmc/
-- 
2.8.3

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH 05/12] macintosh: Only descend into directory when CONFIG_MACINTOSH_DRIVERS is set

2016-06-13 Thread 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 <a...@ti.com>
---
 drivers/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/Makefile b/drivers/Makefile
index 4a885d8..5be5619 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -73,7 +73,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.8.3

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH 08/12] i2c: Only descend into i2c directory when CONFIG_I2C is set

2016-06-13 Thread Andrew F. Davis
When CONFIG_I2C is not set make will still descend into the i2c
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 <a...@ti.com>
---
 drivers/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/Makefile b/drivers/Makefile
index b4202d0..2d99d4e 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -107,7 +107,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-$(CONFIG_I2C)  += i2c/
+obj-y  += media/
 obj-$(CONFIG_PPS)  += pps/
 obj-$(CONFIG_PTP_1588_CLOCK)   += ptp/
 obj-$(CONFIG_W1)   += w1/
-- 
2.8.3

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH 12/12] leds: Only descend into leds directory when CONFIG_NEW_LEDS is set

2016-06-13 Thread Andrew F. Davis
When CONFIG_NEW_LEDS is not set make will still descend into the leds
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 <a...@ti.com>
---
 drivers/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/Makefile b/drivers/Makefile
index 567e32c..fa514d5 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -127,7 +127,7 @@ obj-$(CONFIG_CPU_FREQ)  += cpufreq/
 obj-$(CONFIG_CPU_IDLE) += cpuidle/
 obj-$(CONFIG_MMC)  += mmc/
 obj-$(CONFIG_MEMSTICK) += memstick/
-obj-y  += leds/
+obj-$(CONFIG_NEW_LEDS) += leds/
 obj-$(CONFIG_INFINIBAND)   += infiniband/
 obj-$(CONFIG_SGI_SN)   += sn/
 obj-y  += firmware/
-- 
2.8.3

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH 01/12] gpio: Only descend into gpio directory when CONFIG_GPIOLIB is set

2016-06-13 Thread Andrew F. Davis
When CONFIG_GPIOLIB is not set make will still descend into the gpio
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 <a...@ti.com>
---
 drivers/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/Makefile b/drivers/Makefile
index 0b6f3d6..50f6131 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -12,7 +12,7 @@ obj-$(CONFIG_GENERIC_PHY) += phy/
 
 # GPIO must come after pinctrl as gpios may need to mux pins etc
 obj-$(CONFIG_PINCTRL)  += pinctrl/
-obj-y  += gpio/
+obj-$(CONFIG_GPIOLIB)  += gpio/
 obj-y  += pwm/
 obj-$(CONFIG_PCI)  += pci/
 obj-$(CONFIG_PARISC)   += parisc/
-- 
2.8.3

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH 06/12] hsi: Only descend into hsi directory when CONFIG_HSI is set

2016-06-13 Thread Andrew F. Davis
When CONFIG_HSI is not set make will still descend into the hsi
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 <a...@ti.com>
---
 drivers/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/Makefile b/drivers/Makefile
index 5be5619..78162ba 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -82,7 +82,7 @@ obj-$(CONFIG_TARGET_CORE) += target/
 obj-$(CONFIG_MTD)  += mtd/
 obj-$(CONFIG_SPI)  += spi/
 obj-$(CONFIG_SPMI) += spmi/
-obj-y  += hsi/
+obj-$(CONFIG_HSI)  += hsi/
 obj-y  += net/
 obj-$(CONFIG_ATM)  += atm/
 obj-$(CONFIG_FUSION)   += message/
-- 
2.8.3

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH 04/12] NFC: Only descend into nfc directory when CONFIG_NFC is set

2016-06-13 Thread 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 <a...@ti.com>
---
 drivers/Makefile | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/Makefile b/drivers/Makefile
index 841c2dc..4a885d8 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -64,7 +64,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.8.3

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH 09/12] [media] Only descend into directory when CONFIG_MEDIA_SUPPORT is set

2016-06-13 Thread 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 <a...@ti.com>
---
 drivers/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/Makefile b/drivers/Makefile
index 2d99d4e..19305e0 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -108,7 +108,7 @@ obj-$(CONFIG_GAMEPORT)  += input/gameport/
 obj-$(CONFIG_INPUT)+= input/
 obj-$(CONFIG_RTC_LIB)  += rtc/
 obj-$(CONFIG_I2C)  += i2c/
-obj-y  += media/
+obj-$(CONFIG_MEDIA_SUPPORT)+= media/
 obj-$(CONFIG_PPS)  += pps/
 obj-$(CONFIG_PTP_1588_CLOCK)   += ptp/
 obj-$(CONFIG_W1)   += w1/
-- 
2.8.3

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH 11/12] mmc: Only descend into mmc directory when CONFIG_MMC is set

2016-06-13 Thread Andrew F. Davis
When CONFIG_MMC is not set make will still descend into the mmc
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 <a...@ti.com>
---
 drivers/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/Makefile b/drivers/Makefile
index b178e2f..567e32c 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -125,7 +125,7 @@ obj-$(CONFIG_EISA)  += eisa/
 obj-$(CONFIG_LGUEST)   += lguest/
 obj-$(CONFIG_CPU_FREQ) += cpufreq/
 obj-$(CONFIG_CPU_IDLE) += cpuidle/
-obj-y  += mmc/
+obj-$(CONFIG_MMC)  += mmc/
 obj-$(CONFIG_MEMSTICK) += memstick/
 obj-y  += leds/
 obj-$(CONFIG_INFINIBAND)   += infiniband/
-- 
2.8.3

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH 03/12] amba: Only descend into amba directory when CONFIG_ARM_AMBA is set

2016-06-13 Thread 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 <a...@ti.com>
---
 drivers/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/Makefile b/drivers/Makefile
index 01e707b..841c2dc 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/
 # Many drivers will want to use DMA so this has to be made available
 # really early.
 obj-$(CONFIG_DMADEVICES)   += dma/
-- 
2.8.3

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH 02/12] pwm: Only descend into pwm directory when CONFIG_PWM is set

2016-06-13 Thread 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 <a...@ti.com>
---
 drivers/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/Makefile b/drivers/Makefile
index 50f6131..01e707b 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.8.3

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH 07/12] auxdisplay: Only descend into directory when CONFIG_AUXDISPLAY is set

2016-06-13 Thread 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 <a...@ti.com>
---
 drivers/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/Makefile b/drivers/Makefile
index 78162ba..b4202d0 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -90,7 +90,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.8.3

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev