Skip to content

Commit

Permalink
vfio/pci: Drop unnecessary pcibios_err_to_errno()
Browse files Browse the repository at this point in the history
As of commit d97ffe2 ("PCI: Fix return value from
pci_user_{read,write}_config_*()") it's unnecessary to call
pcibios_err_to_errno() to fixup the return value from these functions.

pcibios_err_to_errno() already does simple passthrough of -errno values,
therefore no functional change is expected.

[aw: changelog]
Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
  • Loading branch information
Cao jin authored and Alex Williamson committed Nov 18, 2016
1 parent 5188287 commit f4cb410
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drivers/vfio/pci/vfio_pci_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ static int vfio_user_config_read(struct pci_dev *pdev, int offset,

*val = cpu_to_le32(tmp_val);

return pcibios_err_to_errno(ret);
return ret;
}

static int vfio_user_config_write(struct pci_dev *pdev, int offset,
Expand All @@ -173,7 +173,7 @@ static int vfio_user_config_write(struct pci_dev *pdev, int offset,
break;
}

return pcibios_err_to_errno(ret);
return ret;
}

static int vfio_default_config_read(struct vfio_pci_device *vdev, int pos,
Expand Down Expand Up @@ -257,7 +257,7 @@ static int vfio_direct_config_read(struct vfio_pci_device *vdev, int pos,

ret = vfio_user_config_read(vdev->pdev, pos, val, count);
if (ret)
return pcibios_err_to_errno(ret);
return ret;

if (pos >= PCI_CFG_SPACE_SIZE) { /* Extended cap header mangling */
if (offset < 4)
Expand Down Expand Up @@ -295,7 +295,7 @@ static int vfio_raw_config_read(struct vfio_pci_device *vdev, int pos,

ret = vfio_user_config_read(vdev->pdev, pos, val, count);
if (ret)
return pcibios_err_to_errno(ret);
return ret;

return count;
}
Expand Down Expand Up @@ -1089,7 +1089,7 @@ static int vfio_msi_config_write(struct vfio_pci_device *vdev, int pos,
start + PCI_MSI_FLAGS,
flags);
if (ret)
return pcibios_err_to_errno(ret);
return ret;
}

return count;
Expand Down

0 comments on commit f4cb410

Please sign in to comment.