Sashiko discussions
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: "Krzysztof Wilczyński" <kwilczynski@kernel.org>
Cc: sashiko@lists.linux.dev, linux-pci@vger.kernel.org
Subject: Re: [PATCH v7 15/24] alpha/PCI: Remove WARN from __pci_mmap_fits() and __legacy_mmap_fits()
Date: Fri, 8 May 2026 18:07:58 -0500	[thread overview]
Message-ID: <20260508230758.GA30814@bhelgaas> (raw)
In-Reply-To: <20260508045824.GA3160093@rocinante>

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

  reply	other threads:[~2026-05-08 23:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260508043543.217179-16-kwilczynski@kernel.org>
     [not found] ` <20260508045452.15B72C2BCB0@smtp.kernel.org>
2026-05-08  5:04   ` [PATCH v7 15/24] alpha/PCI: Remove WARN from __pci_mmap_fits() and __legacy_mmap_fits() Krzysztof Wilczyński
2026-05-08 23:07     ` Bjorn Helgaas [this message]
2026-05-11  7:14       ` Krzysztof Wilczyński

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260508230758.GA30814@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=kwilczynski@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=sashiko@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox