Skip to content

Commit 7010f13

Browse files
julianbrahabjorn-helgaas
authored andcommitted
PCI: Clean up dead code in Kconfig
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). Leave the outer 'if PCI...endif' and remove 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> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Link: https://patch.msgid.link/20260330214549.16157-1-julianbraha@gmail.com
1 parent 47e2a33 commit 7010f13

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

drivers/pci/Kconfig

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ if PCI
3131

3232
config PCI_DOMAINS
3333
bool
34-
depends on PCI
3534

3635
config PCI_DOMAINS_GENERIC
3736
bool
@@ -255,7 +254,7 @@ config PCI_DYNAMIC_OF_NODES
255254
choice
256255
prompt "PCI Express hierarchy optimization setting"
257256
default PCIE_BUS_DEFAULT
258-
depends on PCI && EXPERT
257+
depends on EXPERT
259258
help
260259
MPS (Max Payload Size) and MRRS (Max Read Request Size) are PCIe
261260
device parameters that affect performance and the ability to
@@ -272,20 +271,17 @@ choice
272271

273272
config PCIE_BUS_TUNE_OFF
274273
bool "Tune Off"
275-
depends on PCI
276274
help
277275
Use the BIOS defaults; don't touch MPS at all. This is the same
278276
as booting with 'pci=pcie_bus_tune_off'.
279277

280278
config PCIE_BUS_DEFAULT
281279
bool "Default"
282-
depends on PCI
283280
help
284281
Default choice; ensure that the MPS matches upstream bridge.
285282

286283
config PCIE_BUS_SAFE
287284
bool "Safe"
288-
depends on PCI
289285
help
290286
Use largest MPS that boot-time devices support. If you have a
291287
closed system with no possibility of adding new devices, this
@@ -294,7 +290,6 @@ config PCIE_BUS_SAFE
294290

295291
config PCIE_BUS_PERFORMANCE
296292
bool "Performance"
297-
depends on PCI
298293
help
299294
Use MPS and MRRS for best performance. Ensure that a given
300295
device's MPS is no larger than its parent MPS, which allows us to
@@ -303,7 +298,6 @@ config PCIE_BUS_PERFORMANCE
303298

304299
config PCIE_BUS_PEER2PEER
305300
bool "Peer2peer"
306-
depends on PCI
307301
help
308302
Set MPS = 128 for all devices. MPS configuration effected by the
309303
other options could cause the MPS on one root port to be
@@ -317,7 +311,7 @@ endchoice
317311
config VGA_ARB
318312
bool "VGA Arbitration" if EXPERT
319313
default y
320-
depends on (PCI && !S390)
314+
depends on !S390
321315
select SCREEN_INFO if X86
322316
help
323317
Some "legacy" VGA devices implemented on PCI typically have the same
@@ -340,4 +334,4 @@ source "drivers/pci/endpoint/Kconfig"
340334
source "drivers/pci/switch/Kconfig"
341335
source "drivers/pci/pwrctrl/Kconfig"
342336

343-
endif
337+
endif # PCI

0 commit comments

Comments
 (0)