All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: "Andrew F. Davis" <afd@ti.com>
Cc: Miguel Ojeda Sandonis <miguel.ojeda.sandonis@gmail.com>,
	Wolfram Sang <wsa@the-dreams.de>,
	Richard Purdie <rpurdie@rpsys.net>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Lauro Ramos Venancio <lauro.venancio@openbossa.org>,
	Aloisio Almeida Jr <aloisio.almeida@openbossa.org>,
	Samuel Ortiz <sameo@linux.intel.com>,
	kernel-janitors@vger.kernel.org, linux-pwm@vger.kernel.org,
	linux-wireless <linux-wireless@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linuxppc-dev@lists.ozlabs.org, linux-media@vger.kernel.org
Subject: Re: [PATCH v3 0/7] Remove unneeded build directory traversals
Date: Wed, 15 Mar 2017 22:34:57 +0100	[thread overview]
Message-ID: <CAK8P3a3JxkbEyJig3M=Df=W8KDbwZURmfs7YdMWHx_K+2LsEfQ@mail.gmail.com> (raw)
In-Reply-To: <59d8c3d4-1fdf-7f30-f78c-92ddc9028d36@ti.com>

On Wed, Mar 15, 2017 at 10:15 PM, Andrew F. Davis <afd@ti.com> wrote:
> On 03/15/2017 04:03 PM, Arnd Bergmann wrote:
>> On Wed, Mar 15, 2017 at 5:37 PM, Andrew F. Davis <afd@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.

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

WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de>
To: "Andrew F. Davis" <afd@ti.com>
Cc: Miguel Ojeda Sandonis <miguel.ojeda.sandonis@gmail.com>,
	Wolfram Sang <wsa@the-dreams.de>,
	Richard Purdie <rpurdie@rpsys.net>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Lauro Ramos Venancio <lauro.venancio@openbossa.org>,
	Aloisio Almeida Jr <aloisio.almeida@openbossa.org>,
	Samuel Ortiz <sameo@linux.intel.com>,
	kernel-janitors@vger.kernel.org, linux-pwm@vger.kernel.org,
	linux-wireless <linux-wireless@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linuxppc-dev@lists.ozlabs.org, linux-media@vger.kernel.org
Subject: Re: [PATCH v3 0/7] Remove unneeded build directory traversals
Date: Wed, 15 Mar 2017 21:34:57 +0000	[thread overview]
Message-ID: <CAK8P3a3JxkbEyJig3M=Df=W8KDbwZURmfs7YdMWHx_K+2LsEfQ@mail.gmail.com> (raw)
In-Reply-To: <59d8c3d4-1fdf-7f30-f78c-92ddc9028d36@ti.com>

On Wed, Mar 15, 2017 at 10:15 PM, Andrew F. Davis <afd@ti.com> wrote:
> On 03/15/2017 04:03 PM, Arnd Bergmann wrote:
>> On Wed, Mar 15, 2017 at 5:37 PM, Andrew F. Davis <afd@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.

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

  reply	other threads:[~2017-03-15 21:34 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-15 16:37 [PATCH v3 0/7] Remove unneeded build directory traversals Andrew F. Davis
2017-03-15 16:37 ` Andrew F. Davis
2017-03-15 16:37 ` [PATCH v3 1/7] pwm: Only descend into pwm directory when CONFIG_PWM is set Andrew F. Davis
2017-03-15 16:37   ` Andrew F. Davis
2017-03-15 16:37 ` [PATCH v3 2/7] amba: Only descend into amba directory when CONFIG_ARM_AMBA " Andrew F. Davis
2017-03-15 16:37   ` Andrew F. Davis
2017-03-15 16:37 ` [PATCH v3 3/7] NFC: Only descend into nfc directory when CONFIG_NFC " Andrew F. Davis
2017-03-15 16:37   ` Andrew F. Davis
2017-03-15 16:37 ` [PATCH v3 4/7] macintosh: Only descend into directory when CONFIG_MACINTOSH_DRIVERS " Andrew F. Davis
2017-03-15 16:37   ` Andrew F. Davis
2017-03-16  4:28   ` Michael Ellerman
2017-03-16  4:28     ` Michael Ellerman
2017-03-16  4:28     ` Michael Ellerman
2017-03-15 16:37 ` [PATCH v3 5/7] auxdisplay: Only descend into directory when CONFIG_AUXDISPLAY " Andrew F. Davis
2017-03-15 16:37   ` Andrew F. Davis
2017-03-15 16:37 ` [PATCH v3 6/7] lguest: Only descend into lguest directory when CONFIG_LGUEST " Andrew F. Davis
2017-03-15 16:37   ` Andrew F. Davis
2017-03-15 16:37 ` [PATCH v3 7/7] mmc: Only descend into mmc directory when CONFIG_MMC " Andrew F. Davis
2017-03-15 16:37   ` Andrew F. Davis
2017-03-18  1:06   ` kbuild test robot
2017-03-18  1:06     ` kbuild test robot
2017-03-18  1:06     ` kbuild test robot
2017-03-18  2:07   ` kbuild test robot
2017-03-18  2:07     ` kbuild test robot
2017-03-18  2:07     ` kbuild test robot
2017-03-15 21:03 ` [PATCH v3 0/7] Remove unneeded build directory traversals Arnd Bergmann
2017-03-15 21:03   ` Arnd Bergmann
2017-03-15 21:15   ` Andrew F. Davis
2017-03-15 21:15     ` Andrew F. Davis
2017-03-15 21:15     ` Andrew F. Davis
2017-03-15 21:34     ` Arnd Bergmann [this message]
2017-03-15 21:34       ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAK8P3a3JxkbEyJig3M=Df=W8KDbwZURmfs7YdMWHx_K+2LsEfQ@mail.gmail.com' \
    --to=arnd@arndb.de \
    --cc=afd@ti.com \
    --cc=aloisio.almeida@openbossa.org \
    --cc=benh@kernel.crashing.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=lauro.venancio@openbossa.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mchehab@osg.samsung.com \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=rpurdie@rpsys.net \
    --cc=sameo@linux.intel.com \
    --cc=ulf.hansson@linaro.org \
    --cc=wsa@the-dreams.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.