Skip to contentSkip to conversation

tpci: remove useless ENABLE_BRIDGES

PATCH New Yang Xu 2 participants 3 messages May 13, 2020 – May 18, 2020

lore
Share & tools
lore

Yang Xu

author
#0 lore raw

PATCH 1/2 tpci: remove useless ENABLE_BRIDGES

Since the previous commit, we have removed test_enable_bridges() because pci_enable_bridges() was removed in 3.12 (928bea964827). But it forgot to delete it in tpci.h. So remove it.

Fixes 3dd286b ("ltp_tpci.c: Update legacy code")
---
 testcases/kernel/device-drivers/pci/tpci_kernel/tpci.h | 1 -
 1 file changed, 1 deletion(-)
testcases/kernel/device-drivers/pci/tpci_kernel/tpci.h +0 -1
index f65c6fc22..f7defb29f 100644
@@ -30,7 +30,6 @@ enum PCI_TCASES {
 	FIND_SUBSYS,
 	BUS_SCAN,
 	SLOT_SCAN,
-	ENABLE_BRIDGES,
 	BUS_ADD_DEVICES,
 	MATCH_DEVICE,
 	REG_DRIVER,
Signature · 1 line
2.23.0
author
#1 lore raw

PATCH 2/2 tpci: Remove deprecated CONFIG_HOTPLUG

Since kernel commit 40b313608ad4 ("Finally eradicate CONFIG_HOTPLUG"), it always supports hotplug. It is about 7 years old and many distributions don't have this config, so we can remove it safely.

---
 README.kernel_config                                       | 1 -
 testcases/kernel/device-drivers/pci/tpci_kernel/ltp_tpci.c | 5 -----
 2 files changed, 6 deletions(-)
README.kernel_config +0 -1
index ffb2dec95..547dd4f33 100644
@@ -131,7 +131,6 @@ CONFIG_KEXEC_JUMP=y
 ---------------------------------
 Enabling HOTPLUG for your Kernels
 ---------------------------------
-CONFIG_HOTPLUG=y
 CONFIG_HOTPLUG_CPU=y
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 CONFIG_ACPI_HOTPLUG_CPU=y
testcases/kernel/device-drivers/pci/tpci_kernel/ltp_tpci.c +0 -5
index a57953db6..e29821dda 100644
@@ -290,7 +290,6 @@ static int test_find_subsys(void)
  */
 static int test_scan_bus(void)
 {
-#ifdef CONFIG_HOTPLUG
 	int num;
 	struct pci_bus *bus = ltp_pci.bus;
 
@@ -307,10 +306,6 @@ static int test_scan_bus(void)
 	}
 	prk_info("success scan bus");
 	return TPASS;
-#else
-	prk_info("pci_rescan_bus() is not supported");
-	return TSKIP;
-#endif
 }
 
 /*
Signature · 1 line
2.23.0
#2 lore raw

PATCH 1/2 tpci: remove useless ENABLE_BRIDGES

In reply to Yang Xu

Hi,

Thanks for your work, pushed.

Best Regards,
Xiao Yang

Quoted 22 lines · Yang Xu

Since the previous commit, we have removed test_enable_bridges() because pci_enable_bridges() was removed in 3.12 (928bea964827). But it forgot to delete it in tpci.h. So remove it.

Fixes 3dd286b ("ltp_tpci.c: Update legacy code")
---
  testcases/kernel/device-drivers/pci/tpci_kernel/tpci.h | 1 -
  1 file changed, 1 deletion(-)
testcases/kernel/device-drivers/pci/tpci_kernel/tpci.h +0 -1
index f65c6fc22..f7defb29f 100644
@@ -30,7 +30,6 @@ enum PCI_TCASES {
  	FIND_SUBSYS,
  	BUS_SCAN,
  	SLOT_SCAN,
-	ENABLE_BRIDGES,
  	BUS_ADD_DEVICES,
  	MATCH_DEVICE,
  	REG_DRIVER,