pci: make PCI_SBDF2 return a pci_sbdf_t

And adjust it's only user.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
Roger Pau Monné authored and Jan Beulich committed 2019-06-11 17:19:06 +02:00
1 parent cde324fbad
commit f1379f1bbf
2 files changed
+3 -2

No files matched your search

+1 -1
View File
@@ -1047,7 +1047,7 @@ int intel_iommu_get_reserved_device_memory(iommu_grdm_t *func, void *ctxt)
rc = func(PFN_DOWN(rmrr->base_address),
PFN_UP(rmrr->end_address) - PFN_DOWN(rmrr->base_address),
PCI_SBDF2(rmrr->segment, bdf), ctxt);
PCI_SBDF2(rmrr->segment, bdf).sbdf, ctxt);
if ( unlikely(rc < 0) )
return rc;
+2 -1
View File
@@ -36,7 +36,8 @@
#define PCI_BDF2(b,df) ((((b) & 0xff) << 8) | ((df) & 0xff))
#define PCI_SBDF(s,b,d,f) \
((pci_sbdf_t){ .sbdf = (((s) & 0xffff) << 16) | PCI_BDF(b, d, f) })
#define PCI_SBDF2(s,bdf) ((((s) & 0xffff) << 16) | ((bdf) & 0xffff))
#define PCI_SBDF2(s,bdf) \
((pci_sbdf_t){ .sbdf = (((s) & 0xffff) << 16) | ((bdf) & 0xffff) })
#define PCI_SBDF3(s,b,df) ((((s) & 0xffff) << 16) | PCI_BDF2(b, df))
typedef union {
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.