From: Marc Zyngier <maz@kernel.org>
To: Lizhe <sensor1010@163.com>
Cc: bhelgaas@google.com, tglx@linutronix.de, darwi@linutronix.de,
jgg@ziepe.ca, linux-pci@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] drivers/msi.c : use devm_ioremap replace ioremap
Date: Sun, 22 Jan 2023 10:47:21 +0000 [thread overview]
Message-ID: <86h6win8w6.wl-maz@kernel.org> (raw)
In-Reply-To: <20230121170420.8681-1-sensor1010@163.com>
On Sat, 21 Jan 2023 17:04:20 +0000,
Lizhe <sensor1010@163.com> wrote:
>
> use devm_ioremap replace ioremap
>
> Signed-off-by: Lizhe <sensor1010@163.com>
> ---
> drivers/pci/msi/msi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pci/msi/msi.c b/drivers/pci/msi/msi.c
> index 1f716624ca56..184eca85b88b 100644
> --- a/drivers/pci/msi/msi.c
> +++ b/drivers/pci/msi/msi.c
> @@ -566,7 +566,7 @@ static void __iomem *msix_map_region(struct pci_dev *dev,
> table_offset &= PCI_MSIX_TABLE_OFFSET;
> phys_addr = pci_resource_start(dev, bir) + table_offset;
>
> - return ioremap(phys_addr, nr_entries * PCI_MSIX_ENTRY_SIZE);
> + return devm_ioremap(&dev->dev, phys_addr, nr_entries * PCI_MSIX_ENTRY_SIZE);
> }
And where is the unmap dealt with? From what I can see, this will
probably explode when the device is removed...
M.
--
Without deviation from the norm, progress is not possible.
next prev parent reply other threads:[~2023-01-22 10:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-21 17:04 [PATCH v1] drivers/msi.c : use devm_ioremap replace ioremap Lizhe
2023-01-22 10:47 ` Marc Zyngier [this message]
2023-01-22 12:52 ` Leon Romanovsky
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=86h6win8w6.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=bhelgaas@google.com \
--cc=darwi@linutronix.de \
--cc=jgg@ziepe.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=sensor1010@163.com \
--cc=tglx@linutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).