public inbox for linux-pci@vger.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Julian Braha <julianbraha@gmail.com>
Cc: bhelgaas@google.com, robh@kernel.org,
	linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org
Subject: Re: [PATCH] pci: dead code cleanup in Kconfig
Date: Tue, 31 Mar 2026 14:16:02 -0500	[thread overview]
Message-ID: <20260331191602.GA152534@bhelgaas> (raw)
In-Reply-To: <20260330214549.16157-1-julianbraha@gmail.com>

On Mon, Mar 30, 2026 at 10:45:49PM +0100, Julian Braha wrote:
> There is already an 'if PCI' condition wrapping several config options
> e.g. PCI_DOMAINS and VGA_ARB, making the 'depends on PCI' statement for
> each of these a duplicate dependency (dead code).
> 
> I propose leaving the outer 'if PCI...endif' and removing the individual
> 'depends on PCI' statement from each option.
> 
> This dead code was found by kconfirm, a static analysis tool for Kconfig.
> 
> Signed-off-by: Julian Braha <julianbraha@gmail.com>
> ---
>  drivers/pci/Kconfig | 12 +++---------
>  1 file changed, 3 insertions(+), 9 deletions(-)

I think there might be more redundant dependencies, e.g.,

  - HOTPLUG_PCI in drivers/pci/hotplug/Kconfig depends on PCI but this
    file is only included 'if PCI'

  - there are several "depends on PCI" things in
      drivers/pci/controller/Kconfig
      drivers/pci/controller/cadence/Kconfig
      drivers/pci/controller/dwc/Kconfig
      drivers/pci/controller/plda/Kconfig
      drivers/pci/switch/Kconfig
    I think all these are only included 'if PCI'

      parent reply	other threads:[~2026-03-31 19:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-30 21:45 [PATCH] pci: dead code cleanup in Kconfig Julian Braha
2026-03-30 22:25 ` Bjorn Helgaas
2026-03-31 19:16 ` Bjorn Helgaas [this message]

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=20260331191602.GA152534@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=julianbraha@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=robh@kernel.org \
    /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