From: Joao.Pinto@synopsys.com (Joao Pinto)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 6/8] PCI: Rework of_pci_get_host_bridge_resources() to devm_of_pci_get_host_bridge_resources()
Date: Tue, 15 May 2018 15:28:39 +0100 [thread overview]
Message-ID: <73eb2628-0d45-f23b-72c2-e463aef71f3f@synopsys.com> (raw)
In-Reply-To: <3aeb2ed038cbce8fe744b614dc19d414555a7e8f.1526375226.git.jan.kiszka@siemens.com>
Hi Jan,
?s 10:07 AM de 5/15/2018, Jan Kiszka escreveu:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> of_pci_get_host_bridge_resources() allocates the resource structures it
> fills dynamically, but none of its callers care to release them so far.
> Rather than requiring everyone to do this explicitly, convert the
> existing function to a managed version.
>
> CC: Jingoo Han <jingoohan1@gmail.com>
> CC: Joao Pinto <Joao.Pinto@synopsys.com>
> CC: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> drivers/pci/dwc/pcie-designware-host.c | 2 +-
> drivers/pci/host/pci-aardvark.c | 2 +-
> drivers/pci/host/pci-ftpci100.c | 2 +-
> drivers/pci/host/pci-v3-semi.c | 2 +-
> drivers/pci/host/pci-versatile.c | 2 +-
> drivers/pci/host/pci-xgene.c | 2 +-
> drivers/pci/host/pcie-altera.c | 2 +-
> drivers/pci/host/pcie-iproc-platform.c | 2 +-
> drivers/pci/host/pcie-rcar.c | 2 +-
> drivers/pci/host/pcie-rockchip.c | 2 +-
> drivers/pci/host/pcie-xilinx-nwl.c | 2 +-
> drivers/pci/host/pcie-xilinx.c | 2 +-
> drivers/pci/of.c | 30 ++++++++++++------------------
> include/linux/of_pci.h | 4 ++--
> 14 files changed, 26 insertions(+), 32 deletions(-)
>
> diff --git a/drivers/pci/dwc/pcie-designware-host.c b/drivers/pci/dwc/pcie-designware-host.c
> index 5a535690b7b5..a8f6ab54b4c0 100644
> --- a/drivers/pci/dwc/pcie-designware-host.c
> +++ b/drivers/pci/dwc/pcie-designware-host.c
> @@ -342,7 +342,7 @@ int dw_pcie_host_init(struct pcie_port *pp)
> if (!bridge)
> return -ENOMEM;
>
> - ret = of_pci_get_host_bridge_resources(dev, 0, 0xff,
> + ret = devm_of_pci_get_host_bridge_resources(dev, 0, 0xff,
> &bridge->windows, &pp->io_base);
> if (ret)
> return ret;
(snip...)
Thanks for this patch!
Acked-by: Joao Pinto <jpinto@synopsys.com>
next prev parent reply other threads:[~2018-05-15 14:28 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-15 9:06 [PATCH v4 0/8] PCI: leak fixes, removable generic PCI host, assorted stuff Jan Kiszka
2018-05-15 9:07 ` [PATCH v4 1/8] PCI: Make pci_get_new_domain_nr() static Jan Kiszka
2018-05-15 9:07 ` [PATCH v4 2/8] PCI: Fix memory leak of devm_pci_alloc_host_bridge() Jan Kiszka
2018-05-15 9:07 ` [PATCH v4 3/8] PCI: Rename device node parameter of of_pci_get_host_bridge_resources() Jan Kiszka
2018-05-15 10:04 ` Vladimir Zapolskiy
2018-05-15 9:07 ` [PATCH v4 4/8] PCI: Replace dev_node parameter of of_pci_get_host_bridge_resources with device Jan Kiszka
2018-05-15 10:05 ` Vladimir Zapolskiy
2018-05-15 15:34 ` Jingoo Han
2018-05-28 10:00 ` Vladimir Zapolskiy
2018-05-28 10:46 ` Jan Kiszka
2018-05-29 13:20 ` Bjorn Helgaas
2018-05-15 9:07 ` [PATCH v4 5/8] PCI: Replace pr_*() with dev_*() in of_pci_get_host_bridge_resources() Jan Kiszka
2018-05-15 10:05 ` Vladimir Zapolskiy
2018-05-15 9:07 ` [PATCH v4 6/8] PCI: Rework of_pci_get_host_bridge_resources() to devm_of_pci_get_host_bridge_resources() Jan Kiszka
2018-05-15 10:06 ` Vladimir Zapolskiy
2018-05-15 14:28 ` Joao Pinto [this message]
2018-05-15 15:31 ` Jingoo Han
2018-05-15 16:48 ` Andy Shevchenko
2018-05-15 16:50 ` Andy Shevchenko
2018-05-16 12:31 ` [PATCH] PCI: Clean up resource allocation in devm_of_pci_get_host_bridge_resources() Jan Kiszka
2018-05-17 6:23 ` Vladimir Zapolskiy
2018-06-05 16:26 ` Andy Shevchenko
2018-06-05 20:44 ` Bjorn Helgaas
2018-06-29 23:30 ` Bjorn Helgaas
2018-05-15 9:07 ` [PATCH v4 7/8] PCI: Add support for unbinding the generic PCI host controller Jan Kiszka
2018-05-15 9:07 ` [PATCH v4 8/8] PCI: Enable PCI_DOMAINS along with " Jan Kiszka
2018-05-15 19:00 ` [PATCH v4 0/8] PCI: leak fixes, removable generic PCI host, assorted stuff Bjorn Helgaas
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=73eb2628-0d45-f23b-72c2-e463aef71f3f@synopsys.com \
--to=joao.pinto@synopsys.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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