[Skiboot] [PATCH 2/9] npu2: Remove dead code from npu2_cfg_write_bar()

Reza Arbab arbab at linux.ibm.com
Thu Jan 10 02:58:44 AEDT 2019


We assign pci_cmd, but it never gets used. Remove it.

Signed-off-by: Reza Arbab <arbab at linux.ibm.com>
---
 hw/npu2.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/hw/npu2.c b/hw/npu2.c
index 4e75eeb..aa8a642 100644
--- a/hw/npu2.c
+++ b/hw/npu2.c
@@ -266,10 +266,8 @@ static int64_t npu2_cfg_write_bar(struct npu2_dev *dev,
 				  uint32_t offset, uint32_t size,
 				  uint32_t data)
 {
-	struct pci_virt_device *pvd = dev->nvlink.pvd;
 	struct npu2_pcie_bar *bar = (struct npu2_pcie_bar *) pcrf->data;
 	struct npu2_bar old_bar, *npu2_bar = &bar->npu2_bar;
-	uint32_t pci_cmd;
 
 	if ((size != 4) ||
 	    (offset != pcrf->start && offset != pcrf->start + 4))
@@ -291,8 +289,6 @@ static int64_t npu2_cfg_write_bar(struct npu2_dev *dev,
 		npu2_bar->base &= 0x00000000ffffffff;
 		npu2_bar->base |= ((uint64_t)data << 32);
 
-		PCI_VIRT_CFG_NORMAL_RD(pvd, PCI_CFG_CMD, 4, &pci_cmd);
-
 		if (NPU2_REG(npu2_bar->reg) == NPU2_GENID_BAR && NPU2DEV_BRICK(dev))
 			npu2_bar->base -= 0x10000;
 
-- 
1.8.3.1



More information about the Skiboot mailing list