Re: [PATCH v7 15/24] alpha/PCI: Remove WARN from __pci_mmap_fits() and __legacy_mmap_fits()
Bjorn Helgaas <[email protected]> Fri, 8 May 2026 18:07:58 -0500
| Newsgroups | dev.linux.lists.sashiko,org.kernel.vger.linux-pci |
|---|---|
| Message-ID | <20260508230758.GA30814@bhelgaas> |
On Fri, May 08, 2026 at 02:04:57PM +0900, Krzysztof WilczyĆski wrote:
> Hello,
>
> > > static int __legacy_mmap_fits(struct pci_controller *hose,
> > > struct vm_area_struct *vma,
> > > - unsigned long res_size, int sparse)
> > > + unsigned long res_size)
> >
> > This isn't a bug, but since the WARN() statement that used hose->index was
> > removed below, is the hose parameter still needed? It appears to be completely
> > unused in the function body now.
>
> Ah, yes, darn. Forgot to remove this one, too. A quick fix:
I squashed this in, but you should double-check it because it didn't
apply cleanly.
> diff --git i/arch/alpha/kernel/pci-sysfs.c w/arch/alpha/kernel/pci-sysfs.c
> index 7dae4999c5e3..94dbc470cd6c 100644
> --- i/arch/alpha/kernel/pci-sysfs.c
> +++ w/arch/alpha/kernel/pci-sysfs.c
> @@ -143,8 +143,7 @@ static int sparse_mem_mmap_fits(struct pci_dev *pdev, int num)
>
> /* Legacy I/O bus mapping stuff. */
>
> -static int __legacy_mmap_fits(struct pci_controller *hose,
> - struct vm_area_struct *vma,
> +static int __legacy_mmap_fits(struct vm_area_struct *vma,
> unsigned long res_size)
> {
> unsigned long nr, start, size;
> @@ -179,7 +178,7 @@ int pci_mmap_legacy_page_range(struct pci_bus *bus, struct vm_area_struct *vma,
> if (sparse)
> res_size <<= 5;
>
> - if (!__legacy_mmap_fits(hose, vma, res_size))
> + if (!__legacy_mmap_fits(vma, res_size))
> return -EINVAL;
>
> return hose_mmap_page_range(hose, vma, mmap_type, sparse);
>
> Which can be applied/squashed later.
>
> Thank you!
>
> Krzysztof