From: Bin Meng Date: Sun, 29 Jul 2018 06:36:57 -0700 Subject: [U-Boot] [PATCH v2 06/21] test: dm: pci: Remove unnecessary steps in dm_test_pci_swapcase() In-Reply-To: <1532871432-30703-1-git-send-email-bmeng.cn@gmail.com> References: <1532871432-30703-1-git-send-email-bmeng.cn@gmail.com> Message-ID: <1532871432-30703-7-git-send-email-bmeng.cn@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de The check on uclass_get_device() and device_active() is unnecessary as the follow-up test operations will implicitly probe the driver. Signed-off-by: Bin Meng --- Changes in v2: None test/dm/pci.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/dm/pci.c b/test/dm/pci.c index 47b5d22..be1208c 100644 --- a/test/dm/pci.c +++ b/test/dm/pci.c @@ -34,14 +34,12 @@ DM_TEST(dm_test_pci_busnum, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT); /* Test that we can use the swapcase device correctly */ static int dm_test_pci_swapcase(struct unit_test_state *uts) { - struct udevice *emul, *swap; + struct udevice *swap; ulong io_addr, mem_addr; char *ptr; /* Check that asking for the device automatically fires up PCI */ - ut_assertok(uclass_get_device(UCLASS_PCI_EMUL, 0, &emul)); ut_assertok(dm_pci_bus_find_bdf(PCI_BDF(0, 0x1f, 0), &swap)); - ut_assert(device_active(swap)); /* First test I/O */ io_addr = dm_pci_read_bar32(swap, 0); -- 2.7.4