From nobody Wed Apr 1 09:44:31 2026 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 583923A6408 for ; Mon, 30 Mar 2026 21:45:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774907160; cv=none; b=MN2F8m11/vodJyF202DG1VJmERYWlJily2hJ04elE6F+YxMCBV3ECMozuKFiG03j3D/TqnTp8dvBKsHAmBMmf91RIoQP8Nw9bWazeFcKugHlq25vx5hWDcib+UMaY+dXOHIp/hoJqz3NbkS8Dn1GivT9Iif7DXaIaJBLASuFTQI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774907160; c=relaxed/simple; bh=na3CNjZAxR1UFCvbZH9HyTPvuYJakaPivkdm8gPra6c=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=au/JobXQW4pOYtgydbwI+KHolFr0ao1R1Wj9/12DYmWNllyh9PvbGUoJ1XzeHBvKQctsE8Beu2o6UlWM7YpvLIgTbeePgtJGSy5WrYlq0zjnAGfYJGmg+wgkK4Q0nicVgJaYlx8G8CBFvLDK763jlhAi0lPd3DDoA37sRTeZbHY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=peVHHkjk; arc=none smtp.client-ip=209.85.128.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="peVHHkjk" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-486fb439299so46148185e9.0 for ; Mon, 30 Mar 2026 14:45:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1774907158; x=1775511958; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:from:to:cc:subject:date:message-id:reply-to; bh=k94Qbhxpduj8Aq/R0uxlYLOlSwyCHChCKKV0ReNwEMM=; b=peVHHkjkWgmSVIPPN+PTThkcz/9igpNr21YClND65PHTU3BXWb9zPMm1sbkrTrNv3q JeLxWFtRNtSTzhkKdEF5kb3cuicNRk0uEq2Dl70lyfwZxcNpQDyJVHFN1h5QWzhDczxs bBQJA+tGPjn/nOxqpodi/y0xOtX1b8gb9KkDXZcOhisd+DdL3sW/Sf5iq5LKDFsgcf1J 5q9u8HmyK7/R+19iygE3SfJGd0AHZivSlrx5YtwbTbceXq0TC5pGwDx5k5npcE7KcqOL vh3KzjVFRaybJj0i0emkwyTC3O65Ua6u2QRyzlZ0cCd6j48eEgjkpwJqApg1SvEE6HWO RKdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774907158; x=1775511958; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=k94Qbhxpduj8Aq/R0uxlYLOlSwyCHChCKKV0ReNwEMM=; b=DO2ssXLMfLPojcYWnR5YLKgkFmONZRyKGS9+7985Ux/C26kuoBUem3AbzlDHV1BmGP 1mI5ZjKCZ7Lr/eFyrTv6sBmw0WAqw4PV3Xrdc/MYtFD0ngloHbPw49y3m8g1oDKJRMTc nCk3aQQS1U9aPZ45DJkFMW+EQsr+XrDXXUeGkZZM7McV5ybuGUhvq/GRYTEoz6eGANh+ Hg5EAwKxV2/v4sSvZPVxZqtBK9Oy3zVJeGjepqg9+qc5R0RtiZbrk9XlQzM/9Ttk6e3o oVAT9V5eoVUjzmca3mw4us+oT4bqweA9VU6w0ByCzj5QEp8RvHVLcC9NtdBH0Z2lBRRb UfJA== X-Gm-Message-State: AOJu0Yxbadyt+WyaYsCB7bQOcg3xfjU/rzhGf2KFB26QzQC151SjzbpQ vsS3z8Pnn219LPlNH9HDnfl5cIPvuUHkQBqwaUeWIWYw0W0fbQjpJXLr X-Gm-Gg: ATEYQzzJdltIsVyByNNZdy5JaiGneZYcNW45sXtgtUTo4RfKD559U/oz9KEu1+CNTpT JO92sWevJit8Aj+ux7fhoa+x8Og6ZyIITwLy7jdWY7nRWlT3T1jy9AlOSWMopNN3VU0UJUjf1nx cKGhWgX9HasZtzYM/iYbcy5nELwBIitFTH/P4IinJDiljwpG20QQt1SDpgFobRg5SXJgHn+SsUt 33MHfIbPtI2oS/d/WvK7Sb2plV4rfZdJjloEjN3mvcY42Iab/NOJPTBaYUL4DpKRj1iTxuuvCOf 9iV5mZMhUxPKMNedmrZcTMbQnnRg9Gz8Fr4H8y7K4J7ARWNSGMpyX2EpT3IzmA+tPVEzbESqiLj 4bOmMydeB2ktzOQ4n9SMfoBxKTAfzjng/qUNOAX8EWHHTeSl1Dno+ceNgZXNuHfN1qAhPuZZLfq rvgxIDNVjiAjaiPkHyRqPRDiba/fGb/CSJDzSw0Woslx4Xh6T8SUqmeCc= X-Received: by 2002:a05:600c:8b70:b0:487:467:42a2 with SMTP id 5b1f17b1804b1-48727f7b571mr239745795e9.18.1774907157688; Mon, 30 Mar 2026 14:45:57 -0700 (PDT) Received: from nixos-office (195-23-151-163.net.novis.pt. [195.23.151.163]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48722d2366dsm305888025e9.10.2026.03.30.14.45.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Mar 2026 14:45:57 -0700 (PDT) Sender: Julian Braha From: Julian Braha To: bhelgaas@google.com, robh@kernel.org Cc: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, Julian Braha Subject: [PATCH] pci: dead code cleanup in Kconfig Date: Mon, 30 Mar 2026 22:45:49 +0100 Message-ID: <20260330214549.16157-1-julianbraha@gmail.com> X-Mailer: git-send-email 2.51.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 --- drivers/pci/Kconfig | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig index e3f848ffb52a..33c88432b728 100644 --- a/drivers/pci/Kconfig +++ b/drivers/pci/Kconfig @@ -31,7 +31,6 @@ if PCI =20 config PCI_DOMAINS bool - depends on PCI =20 config PCI_DOMAINS_GENERIC bool @@ -255,7 +254,7 @@ config PCI_DYNAMIC_OF_NODES choice prompt "PCI Express hierarchy optimization setting" default PCIE_BUS_DEFAULT - depends on PCI && EXPERT + depends on EXPERT help MPS (Max Payload Size) and MRRS (Max Read Request Size) are PCIe device parameters that affect performance and the ability to @@ -272,20 +271,17 @@ choice =20 config PCIE_BUS_TUNE_OFF bool "Tune Off" - depends on PCI help Use the BIOS defaults; don't touch MPS at all. This is the same as booting with 'pci=3Dpcie_bus_tune_off'. =20 config PCIE_BUS_DEFAULT bool "Default" - depends on PCI help Default choice; ensure that the MPS matches upstream bridge. =20 config PCIE_BUS_SAFE bool "Safe" - depends on PCI help Use largest MPS that boot-time devices support. If you have a closed system with no possibility of adding new devices, this @@ -294,7 +290,6 @@ config PCIE_BUS_SAFE =20 config PCIE_BUS_PERFORMANCE bool "Performance" - depends on PCI help Use MPS and MRRS for best performance. Ensure that a given device's MPS is no larger than its parent MPS, which allows us to @@ -303,7 +298,6 @@ config PCIE_BUS_PERFORMANCE =20 config PCIE_BUS_PEER2PEER bool "Peer2peer" - depends on PCI help Set MPS =3D 128 for all devices. MPS configuration effected by the other options could cause the MPS on one root port to be @@ -317,7 +311,7 @@ endchoice config VGA_ARB bool "VGA Arbitration" if EXPERT default y - depends on (PCI && !S390) + depends on !S390 select SCREEN_INFO if X86 help Some "legacy" VGA devices implemented on PCI typically have the same @@ -340,4 +334,4 @@ source "drivers/pci/endpoint/Kconfig" source "drivers/pci/switch/Kconfig" source "drivers/pci/pwrctrl/Kconfig" =20 -endif +endif # PCI --=20 2.51.2