Re: [PATCH v2 2/9] fpga/dfl-pci.c: Replace deprecated PCI functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 21, 2024 at 10:19 AM Philipp Stanner <pstanner@xxxxxxxxxx> wrote:
>
> pcim_iomap_regions() and pcim_iomap_table() have been deprecated by the
> PCI subsystem in commit e354bb84a4c1 ("PCI: Deprecate
> pcim_iomap_table(), pcim_iomap_regions_request_all()").
>
> Port dfl-pci.c to the successor, pcim_iomap_region().
>
> Consistently, replace pcim_iounmap_regions() with pcim_iounmap_region().

>  static void __iomem *cci_pci_ioremap_bar0(struct pci_dev *pcidev)
>  {
> -       if (pcim_iomap_regions(pcidev, BIT(0), DRV_NAME))
> +       void __iomem *bar0;
> +
> +       bar0 = pcim_iomap_region(pcidev, 0, DRV_NAME);
> +       if (IS_ERR(bar0))
>                 return NULL;
>
> -       return pcim_iomap_table(pcidev)[0];
> +       return bar0;
>  }

Now this becomes an unneeded wrapper on pcim_ioremap_region(). Can we
kill this helper completely?

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux