Skip to content

Commit

Permalink
npu2: Remove dead code from npu2_cfg_write_bar()
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
  • Loading branch information
rarbab authored and stewartsmith committed Jan 16, 2019
1 parent aa56d9a commit 552cb9e
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions hw/npu2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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;

Expand Down

0 comments on commit 552cb9e

Please sign in to comment.