summaryrefslogtreecommitdiff
path: root/include/linux/pci.h
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2021-09-02 14:56:43 -0500
committerBjorn Helgaas <bhelgaas@google.com>2021-09-02 14:56:43 -0500
commit9045f63e67bc91f02be245346fff9fb9703e7a3c (patch)
tree6012b02f9620067773ca01d2b9db485151d6bbb8 /include/linux/pci.h
parente210d9fc0903e83aa018a32227f7ff529e593004 (diff)
parentca32b5310a1a3835f81f498367f1bb7450c8b67b (diff)
Merge branch 'pci/resource'
- Refactor pci_ioremap_bar() and pci_ioremap_wc_bar() (Krzysztof WilczyƄski) - Optimize pci_resource_len() to reduce kernel size (Zhen Lei) * pci/resource: PCI: Optimize pci_resource_len() to reduce kernel size PCI: Refactor pci_ioremap_bar() and pci_ioremap_wc_bar()
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r--include/linux/pci.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 8c8f9869492c..85801c6375f2 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1891,9 +1891,7 @@ int pci_iobar_pfn(struct pci_dev *pdev, int bar, struct vm_area_struct *vma);
#define pci_resource_end(dev, bar) ((dev)->resource[(bar)].end)
#define pci_resource_flags(dev, bar) ((dev)->resource[(bar)].flags)
#define pci_resource_len(dev,bar) \
- ((pci_resource_start((dev), (bar)) == 0 && \
- pci_resource_end((dev), (bar)) == \
- pci_resource_start((dev), (bar))) ? 0 : \
+ ((pci_resource_end((dev), (bar)) == 0) ? 0 : \
\
(pci_resource_end((dev), (bar)) - \
pci_resource_start((dev), (bar)) + 1))