From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-ot0-f196.google.com ([74.125.82.196]:32887 "EHLO mail-ot0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751765AbdCOVe7 (ORCPT ); Wed, 15 Mar 2017 17:34:59 -0400 MIME-Version: 1.0 In-Reply-To: <59d8c3d4-1fdf-7f30-f78c-92ddc9028d36@ti.com> References: <20170315163730.17055-1-afd@ti.com> <59d8c3d4-1fdf-7f30-f78c-92ddc9028d36@ti.com> From: Arnd Bergmann Date: Wed, 15 Mar 2017 22:34:57 +0100 Message-ID: (sfid-20170315_223550_365218_D1B03F3C) Subject: Re: [PATCH v3 0/7] Remove unneeded build directory traversals To: "Andrew F. Davis" Cc: Miguel Ojeda Sandonis , Wolfram Sang , Richard Purdie , Benjamin Herrenschmidt , Mauro Carvalho Chehab , Ulf Hansson , Lauro Ramos Venancio , Aloisio Almeida Jr , Samuel Ortiz , kernel-janitors@vger.kernel.org, linux-pwm@vger.kernel.org, linux-wireless , Linux Kernel Mailing List , linuxppc-dev@lists.ozlabs.org, linux-media@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-wireless-owner@vger.kernel.org List-ID: On Wed, Mar 15, 2017 at 10:15 PM, Andrew F. Davis wrote: > On 03/15/2017 04:03 PM, Arnd Bergmann wrote: >> On Wed, Mar 15, 2017 at 5:37 PM, Andrew F. Davis 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. Ah, I see now what happened to mmc: obj-$(subst m,y,$(CONFIG_MMC)) += host/ tmio_mmc_core-$(subst m,y,$(CONFIG_MMC_SDHI)) += tmio_mmc_dma.o obj-$(subst m,y,$(CONFIG_MMC_SDHCI_PCI)) += sdhci-pci-data.o with CONFIG_MMC=m, this will fail to build the built-in files in drivers/mmc/host. I suppose this could be expressed in a different way these days, but dropping the patch would be easier. Arnd From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Date: Wed, 15 Mar 2017 21:34:57 +0000 Subject: Re: [PATCH v3 0/7] Remove unneeded build directory traversals Message-Id: List-Id: References: <20170315163730.17055-1-afd@ti.com> <59d8c3d4-1fdf-7f30-f78c-92ddc9028d36@ti.com> In-Reply-To: <59d8c3d4-1fdf-7f30-f78c-92ddc9028d36@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: "Andrew F. Davis" Cc: Miguel Ojeda Sandonis , Wolfram Sang , Richard Purdie , Benjamin Herrenschmidt , Mauro Carvalho Chehab , Ulf Hansson , Lauro Ramos Venancio , Aloisio Almeida Jr , Samuel Ortiz , kernel-janitors@vger.kernel.org, linux-pwm@vger.kernel.org, linux-wireless , Linux Kernel Mailing List , linuxppc-dev@lists.ozlabs.org, linux-media@vger.kernel.org On Wed, Mar 15, 2017 at 10:15 PM, Andrew F. Davis wrote: > On 03/15/2017 04:03 PM, Arnd Bergmann wrote: >> On Wed, Mar 15, 2017 at 5:37 PM, Andrew F. Davis 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. Ah, I see now what happened to mmc: obj-$(subst m,y,$(CONFIG_MMC)) += host/ tmio_mmc_core-$(subst m,y,$(CONFIG_MMC_SDHI)) += tmio_mmc_dma.o obj-$(subst m,y,$(CONFIG_MMC_SDHCI_PCI)) += sdhci-pci-data.o with CONFIG_MMC=m, this will fail to build the built-in files in drivers/mmc/host. I suppose this could be expressed in a different way these days, but dropping the patch would be easier. Arnd