[PATCH v4 13/24] alpha/PCI: Use PCI resource accessor macros
Ilpo Järvinen
ilpo.jarvinen at linux.intel.com
Mon Apr 13 21:52:49 AEST 2026
On Sat, 11 Apr 2026, Krzysztof Wilczyński wrote:
> Replace direct pdev->resource[] accesses with pci_resource_n(),
> and pdev->resource[].flags accesses with pci_resource_flags().
>
> No functional changes intended.
>
> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen at linux.intel.com>
> 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) {
This could have used the new helper but since this code is going away
anyway in a later patch it doesn't matter,
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen at linux.intel.com>
--
i.
More information about the Linuxppc-dev
mailing list