From: Jan Beulich Date: Wed, 6 Jul 2016 06:58:19 +0000 (-0600) Subject: xen-pciback: simplify determination of 64-bit memory resource X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c8670c22e04e4e42e752cc5b53922106b3eedbda;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git xen-pciback: simplify determination of 64-bit memory resource Other than for raw BAR values, flags are properly separated in the internal representation. Signed-off-by: Jan Beulich Signed-off-by: David Vrabel --- diff --git a/drivers/xen/xen-pciback/conf_space_header.c b/drivers/xen/xen-pciback/conf_space_header.c index 56647b873697..bfa610d02443 100644 --- a/drivers/xen/xen-pciback/conf_space_header.c +++ b/drivers/xen/xen-pciback/conf_space_header.c @@ -222,10 +222,7 @@ static void *bar_init(struct pci_dev *dev, int offset) pos = PCI_ROM_RESOURCE; else { pos = (offset - PCI_BASE_ADDRESS_0) / 4; - if (pos && ((res[pos - 1].flags & (PCI_BASE_ADDRESS_SPACE | - PCI_BASE_ADDRESS_MEM_TYPE_MASK)) == - (PCI_BASE_ADDRESS_SPACE_MEMORY | - PCI_BASE_ADDRESS_MEM_TYPE_64))) { + if (pos && (res[pos - 1].flags & IORESOURCE_MEM_64)) { bar->val = res[pos - 1].start >> 32; bar->len_val = -resource_size(&res[pos - 1]) >> 32; return bar;