Message ID | 75d1c852-e6ea-d3f3-3624-c77fb678412a@suse.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | PCI: drop a redundant variable from pci_add_device() | expand |
On 28/04/2020 13:59, Jan Beulich wrote: > Surrounding code already uses the available alternative, after all. > > Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
> -----Original Message----- > From: Jan Beulich <jbeulich@suse.com> > Sent: 28 April 2020 14:00 > To: xen-devel@lists.xenproject.org > Cc: Paul Durrant <paul@xen.org> > Subject: [PATCH] PCI: drop a redundant variable from pci_add_device() > > Surrounding code already uses the available alternative, after all. > > Signed-off-by: Jan Beulich <jbeulich@suse.com> > Reviewed-by: Paul Durrant <paul@xen.org>
--- a/xen/drivers/passthrough/pci.c +++ b/xen/drivers/passthrough/pci.c @@ -760,7 +760,6 @@ int pci_add_device(u16 seg, u8 bus, u8 d { unsigned int idx = pos + PCI_SRIOV_BAR + i * 4; uint32_t bar = pci_conf_read32(pdev->sbdf, idx); - pci_sbdf_t sbdf = PCI_SBDF3(seg, bus, devfn); if ( (bar & PCI_BASE_ADDRESS_SPACE) == PCI_BASE_ADDRESS_SPACE_IO ) @@ -771,7 +770,8 @@ int pci_add_device(u16 seg, u8 bus, u8 d seg, bus, slot, func, i); continue; } - ret = pci_size_mem_bar(sbdf, idx, NULL, &pdev->vf_rlen[i], + ret = pci_size_mem_bar(pdev->sbdf, idx, NULL, + &pdev->vf_rlen[i], PCI_BAR_VF | ((i == PCI_SRIOV_NUM_BARS - 1) ? PCI_BAR_LAST : 0));
Surrounding code already uses the available alternative, after all. Signed-off-by: Jan Beulich <jbeulich@suse.com>