mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3] misc: Kconfig: tc9564: fix and simplify dependencies
@ 2026-10-02 15:57 Alex Elder
  0 siblings, 0 replies; only message in thread
From: Alex Elder @ 2026-10-02 15:57 UTC (permalink / raw)
  To: arnd, gregkh; +Cc: daniel, bhelgaas, linux-kernel, kernel test robot

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 *depending on* rather than
*selecting* PCI_QUIRKS allows us to avoid the recursion when
depending on OF_IRQ.

Separately, PCI_DYNAMIC_OF_NODES is a user-visible option, so it
should be depended on, not selected.  Changing this allows some
further simplification.

PCI_DYNAMIC_OF_NODES is only exposed as an option if PCI is enabled,
so by depending on it, we can omit the dependency on PCI.

Additionally, PCI_DYNAMIC_OF_NODES depends on OF_IRQ, so we can omit
the explicit OF_IRQ dependency.

Finally, OF_IRQ is only exposed as an option if OF is enabled, so we
can skip explicitly depending on OF as well.

In summary, depending on (rather than selecting) PCI_DYNAMIC_OF_NODES
satisfies the dependencies on PCI, OF_IRQ, and OF.  We still need to
*depend on* PCI_QUIRKS, to avoid the circular dependency related to
OF_IRQ.

Simplify the dependencies for TC9564_PCI to just depending on
PCI_DYNAMIC_OF_NODES and PCI_QUIRKS.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202610020124.ieOiopjQ-lkp@intel.com/
Closes: https://lore.kernel.org/oe-kbuild-all/202610021154.ObogJhHN-lkp@intel.com/
Closes: https://lore.kernel.org/oe-kbuild-all/202610021249.J94Hg1xo-lkp@intel.com/
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 1304b0c47ef81 ("misc: tc9564: introduce base PCI driver")
Signed-off-by: Alex Elder <elder@riscstar.com>
---
 drivers/misc/Kconfig | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
index 9c5b1e9d672e8..f45b5ffa43444 100644
--- a/drivers/misc/Kconfig
+++ b/drivers/misc/Kconfig
@@ -570,10 +570,8 @@ config MCHP_LAN966X_PCI
 
 config TC9564_PCI
 	tristate "Toshiba TC9564 PCI function support"
-	depends on OF
-	depends on PCI
-	select PCI_DYNAMIC_OF_NODES
-	select PCI_QUIRKS
+	depends on PCI_DYNAMIC_OF_NODES
+	depends on PCI_QUIRKS
 	default m
 	help
 	  This enables support for two PCI functions implemented by the

base-commit: 04434a1d0f311d76b1f15fa987918b471a0b8c6a
-- 
2.53.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-02 15:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-02 15:57 [PATCH v3] misc: Kconfig: tc9564: fix and simplify dependencies Alex Elder

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®