[PATCH 12/20] alpha/PCI: Use PCI resource accessor macros
Krzysztof Wilczyński
kwilczynski at kernel.org
Fri Apr 10 15:50:32 AEST 2026
Replace direct pdev->resource[] accesses with pci_resource_n(),
and pdev->resource[].flags accesses with pci_resource_flags().
No functional changes intended.
Signed-off-by: Krzysztof Wilczyński <kwilczynski at kernel.org>
---
arch/alpha/kernel/pci-sysfs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/alpha/kernel/pci-sysfs.c b/arch/alpha/kernel/pci-sysfs.c
index c84867ce31f5..7aac5e76dcd6 100644
--- a/arch/alpha/kernel/pci-sysfs.c
+++ b/arch/alpha/kernel/pci-sysfs.c
@@ -141,7 +141,7 @@ static int sparse_mem_mmap_fits(struct pci_dev *pdev, int num)
long dense_offset;
unsigned long sparse_size;
- pcibios_resource_to_bus(pdev->bus, &bar, &pdev->resource[num]);
+ pcibios_resource_to_bus(pdev->bus, &bar, pci_resource_n(pdev, num));
/* All core logic chips have 4G sparse address space, except
CIA which has 16G (see xxx_SPARSE_MEM and xxx_DENSE_MEM
@@ -181,7 +181,7 @@ static int pci_create_attr(struct pci_dev *pdev, int num)
suffix = ""; /* Assume bwx machine, normal resourceN files. */
nlen1 = 10;
- if (pdev->resource[num].flags & IORESOURCE_MEM) {
+ if (pci_resource_flags(pdev, num) & IORESOURCE_MEM) {
sparse_base = hose->sparse_mem_base;
dense_base = hose->dense_mem_base;
if (sparse_base && !sparse_mem_mmap_fits(pdev, num)) {
--
2.53.0
More information about the Linuxppc-dev
mailing list