From: Takashi Iwai <tiwai@suse.de>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: alsa-devel@alsa-project.org, broonie@kernel.org,
torvalds@linux-foundation.org, vinod.koul@intel.com,
liam.r.girdwood@linux.intel.com,
andriy.shevchenko@linux.intel.com, arnd@arndb.de,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/9] ASoC: Intel: Fix Kconfig with top-level selector
Date: Tue, 19 Dec 2017 11:17:06 +0100 [thread overview]
Message-ID: <s5hr2rr3tul.wl-tiwai@suse.de> (raw)
In-Reply-To: <567e85e3-2906-86c8-9cd1-6210f811bd73@linux.intel.com>
On Fri, 15 Dec 2017 13:30:28 +0100,
Pierre-Louis Bossart wrote:
>
> On 12/15/17 5:07 AM, Takashi Iwai wrote:
> > On Fri, 15 Dec 2017 01:44:43 +0100,
> > Pierre-Louis Bossart wrote:
> >>
> >> +config SND_SOC_ACPI_INTEL_MATCH
> >> + tristate
> >> + depends on X86 && ACPI
> >> + select SND_SOC_ACPI
> >
> > An item that is selected by others can only select, not depend.
> > The depends need to be put for the items that select this instead.
>
> Initially the code was
>
> config SND_SOC_ACPI_INTEL_MATCH
> tristate
> select SND_SOC_ACPI if ACPI
>
> I changed it to use depends to make some 0-day reports go away, for
> some reason this option was selected with ARCH=mn10300 and generated
> warnings. I don't quite understand how that happened since X86 and
> ACPI are clear dependencies in the items which select this option...
>
> Vinod also added a similar pattern with
>
> +config SND_SOC_INTEL_SST_TOPLEVEL
> + bool "Intel ASoC SST drivers"
> + default y
> + depends on X86 || COMPILE_TEST
> + select SND_SOC_INTEL_MACH
>
> +menuconfig SND_SOC_INTEL_MACH
> + bool "Intel Machine drivers"
> depends on SND_SOC_INTEL_SST_TOPLEVEL
>
> Maybe that needs to be removed as well?
Having both depends and select on the top-level is OK. The only
problem is when an item that is selected by others has another
depends. For example, a simple-looking case like below is actually
buggy:
config BAR
tristate
depends on X
config FOO
tristate "foo"
select BAR
Here BAR would be enabled by FOO no matter what X is, even if X=n.
That said, when an item is selected, its own dependency is ignored.
For correcting this, the depends-on-X must be moved to the top-level
who selects the item:
config BAR
tristate
config FOO
tristate "foo"
depends on X
select BAR
Note that the reverse-select chain works as expected. The breakage is
only the mixture of select and depends in the selected items.
Takashi
next prev parent reply other threads:[~2017-12-19 10:17 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-15 0:44 [PATCH 0/9] ASoC: Intel: Kconfig fixes Pierre-Louis Bossart
2017-12-15 0:44 ` [PATCH 1/9] ASoC: Intel: Fix Kconfig with top-level selector Pierre-Louis Bossart
2017-12-15 11:07 ` Takashi Iwai
2017-12-15 12:30 ` Pierre-Louis Bossart
2017-12-19 10:17 ` Takashi Iwai [this message]
2017-12-15 11:10 ` Andy Shevchenko
2017-12-15 0:44 ` [PATCH 2/9] ASoC: Intel: Kconfig: Simplify-clarify ACPI/PCI dependencies Pierre-Louis Bossart
2017-12-15 10:58 ` Andy Shevchenko
2017-12-15 12:34 ` Pierre-Louis Bossart
2017-12-19 10:49 ` Andy Shevchenko
2017-12-19 12:43 ` Pierre-Louis Bossart
2017-12-15 0:44 ` [PATCH 3/9] ASoC: Intel: document what Kconfig options do Pierre-Louis Bossart
2017-12-15 10:56 ` Andy Shevchenko
2017-12-15 0:44 ` [PATCH 4/9] ASoC: Intel: Fix nested/unnecessary Kconfig dependencies Pierre-Louis Bossart
2017-12-15 0:44 ` [PATCH 5/9] ASoC: Intel: boards: align Kconfig dependencies for Haswell/Broadwell Pierre-Louis Bossart
2017-12-15 0:44 ` [PATCH 6/9] ASoC: Intel: boards: align Kconfig configurations for HiFi2 Pierre-Louis Bossart
2017-12-15 10:53 ` Andy Shevchenko
2017-12-15 0:44 ` [PATCH 7/9] ASoC: Intel: boards: align/fix SKL/BXT/KBL Kconfigs Pierre-Louis Bossart
2017-12-15 0:44 ` [PATCH 8/9] ASoC: Intel: kconfig: add some comments for if symbols Pierre-Louis Bossart
2017-12-15 0:44 ` [PATCH 9/9] ASoC: Intel: kconfig: drop boiler plate text from config items Pierre-Louis Bossart
2017-12-15 10:51 ` Andy Shevchenko
2017-12-15 5:34 ` [PATCH 0/9] ASoC: Intel: Kconfig fixes Vinod Koul
2017-12-15 11:06 ` Andy Shevchenko
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=s5hr2rr3tul.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=arnd@arndb.de \
--cc=broonie@kernel.org \
--cc=liam.r.girdwood@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=torvalds@linux-foundation.org \
--cc=vinod.koul@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome