From: "Arnd Bergmann" <arnd@arndb.de>
To: "Alex Elder" <elder@riscstar.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
Cc: daniel@riscstar.com, bhelgaas@google.com,
linux-kernel@vger.kernel.org, "kernel test robot" <lkp@intel.com>
Subject: Re: [PATCH] misc: Kconfig: tc9564: fix a circular dependency
Date: Fri, 02 Oct 2026 08:02:37 +0200 [thread overview]
Message-ID: <d8890acd-d854-4f66-8ea9-3b30bde41605@app.fastmail.com> (raw)
In-Reply-To: <20261002013306.373689-1-elder@riscstar.com>
On Fri, Oct 2, 2026, at 03:33, Alex Elder wrote:
> The TC9564_PCI config option selects PCI_DYNAMIC_OF_NODES. But that
> depends on OF_IRQ, and TC9564_PCI does not satisfy that dependency.
>
> Simply adding "depends on OF_IRQ" results in a recursive Kconfig
> dependency.
>
> A little experimentation shows that the recursion can be avoided
> when "depends on OF_IRQ" is added by *depending on* rather than
> *selecting* PCI_QUIRKS.
Hi Alex,
This change looks technically correct, but I find the description
misleading as you are not actually fixing a circular dependency
but instead a missing one.
> diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
> index 9c5b1e9d672e8..87ea92af81dca 100644
> --- a/drivers/misc/Kconfig
> +++ b/drivers/misc/Kconfig
> @@ -571,9 +571,10 @@ config MCHP_LAN966X_PCI
> config TC9564_PCI
> tristate "Toshiba TC9564 PCI function support"
> depends on OF
> + depends on OF_IRQ
> depends on PCI
> + depends on PCI_QUIRKS
> select PCI_DYNAMIC_OF_NODES
> - select PCI_QUIRKS
> default m
I would go further here and simplify this to
config TC9564_PCI
tristate "Toshiba TC9564 PCI function support"
depends on PCI && PCI_DYNAMIC_OF_NODES && PCI_QUIRKS
(in either one or three lines)
CONFIG_PCI_DYNAMIC_OF_NODES is a user-visible option, so you
should not select it from a driver.
Arnd
next prev parent reply other threads:[~2026-10-02 6:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-02 1:33 Alex Elder
2026-10-02 6:02 ` Arnd Bergmann [this message]
2026-10-02 12:50 ` Alex Elder
2026-10-02 12:55 ` Arnd Bergmann
2026-10-02 14:07 ` Alex Elder
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=d8890acd-d854-4f66-8ea9-3b30bde41605@app.fastmail.com \
--to=arnd@arndb.de \
--cc=bhelgaas@google.com \
--cc=daniel@riscstar.com \
--cc=elder@riscstar.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@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
all inboxes | Powered by JetHome®