diff mbox series

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

Message ID 1547049531-759-2-git-send-email-arbab@linux.ibm.com
State Accepted
Headers show
Series [1/9] Remove duplicate npu2-common.o from $(HW_OBJS) | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success master/apply_patch Successfully applied
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot success Test snowpatch/job/snowpatch-skiboot on branch master

Commit Message

Reza Arbab Jan. 9, 2019, 3:58 p.m. UTC
We assign pci_cmd, but it never gets used. Remove it.

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

Comments

Andrew Donnellan Jan. 9, 2019, 11:59 p.m. UTC | #1
On 10/1/19 2:58 am, Reza Arbab wrote:
> We assign pci_cmd, but it never gets used. Remove it.
> 
> Signed-off-by: Reza Arbab <arbab@linux.ibm.com>

Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
diff mbox series

Patch

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;