linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
To: Jan Kiszka <jan.kiszka@siemens.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	<linux-pci@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>
Cc: Jingoo Han <jingoohan1@gmail.com>,
	Joao Pinto <Joao.Pinto@synopsys.com>,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Subject: Re: [PATCH v2 07/10] PCI: Convert of_pci_get_host_bridge_resources() users to devm variant
Date: Thu, 3 May 2018 10:18:24 +0300	[thread overview]
Message-ID: <dbfa80fb-5fe8-3ccd-6886-4604ef9e058b@mentor.com> (raw)
In-Reply-To: <ed3e6df4feca5febefa14716d62aaddd5b4a39d1.1525067324.git.jan.kiszka@siemens.com>

Hi Jan,

On 04/30/2018 08:48 AM, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
> 
> Straightforward for all of them, no more leaks afterwards.
> 
> 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>
> Acked-by: Jingoo Han <jingoo1han@gmail.com>

[snip]

> diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c
> index 6ab28f29ac6a..6eb36c924983 100644
> --- a/drivers/pci/host/pcie-rcar.c
> +++ b/drivers/pci/host/pcie-rcar.c
> @@ -1067,12 +1067,11 @@ static int rcar_pcie_parse_request_of_pci_ranges(struct rcar_pcie *pci)
>  {
>  	int err;
>  	struct device *dev = pci->dev;
> -	struct device_node *np = dev->of_node;
>  	resource_size_t iobase;
>  	struct resource_entry *win, *tmp;
>  
> -	err = of_pci_get_host_bridge_resources(np, 0, 0xff, &pci->resources,
> -					       &iobase);
> +	err = devm_of_pci_get_host_bridge_resources(dev, 0, 0xff,
> +						    &pci->resources, &iobase);
>  	if (err)
>  		return err;
>  

this one snippet is obsoleted by https://patchwork.ozlabs.org/patch/904326/

If 08/10 remains a deprecation, then it is sufficient to exclude the R-Car change,
otherwise I hope maintainers can deal with the proper ordering.

For PCI OF change:

> diff --git a/drivers/pci/of.c b/drivers/pci/of.c
> index f16b343d3b85..5a88d46a41b7 100644
> --- a/drivers/pci/of.c
> +++ b/drivers/pci/of.c
> @@ -645,12 +645,12 @@ int pci_parse_request_of_pci_ranges(struct device *dev,
>  				    struct resource **bus_range)
>  {
>  	int err, res_valid = 0;
> -	struct device_node *np = dev->of_node;
>  	resource_size_t iobase;
>  	struct resource_entry *win, *tmp;
>  
>  	INIT_LIST_HEAD(resources);
> -	err = of_pci_get_host_bridge_resources(np, 0, 0xff, resources, &iobase);
> +	err = devm_of_pci_get_host_bridge_resources(dev, 0, 0xff, resources,
> +						    &iobase);
>  	if (err)
>  		return err;
>  
> 

Reviewed-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Tested-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>

--
With best wishes,
Vladimir

  reply	other threads:[~2018-05-03  7:18 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-30  5:48 [PATCH v2 00/10] PCI: leak fixes, removable generic PCI host, assorted stuff Jan Kiszka
2018-04-30  5:48 ` [PATCH v2 01/10] PCI: Make pci_get_new_domain_nr() static Jan Kiszka
2018-04-30  5:48 ` [PATCH v2 02/10] PCI: Fix memory leak of devm_pci_alloc_host_bridge() Jan Kiszka
2018-04-30  5:48 ` [PATCH v2 03/10] PCI: Factor out __of_pci_get_host_bridge_resources() Jan Kiszka
2018-05-03  7:14   ` Vladimir Zapolskiy
2018-04-30  5:48 ` [PATCH v2 04/10] PCI: Add dev parameter to __of_pci_get_host_bridge_resources() Jan Kiszka
2018-05-03  7:14   ` Vladimir Zapolskiy
2018-04-30  5:48 ` [PATCH v2 05/10] PCI: Replace pr_*() with dev_*() in __of_pci_get_host_bridge_resources() Jan Kiszka
2018-05-03  7:15   ` Vladimir Zapolskiy
2018-04-30  5:48 ` [PATCH v2 06/10] PCI: Introduce devm_of_pci_get_host_bridge_resources() Jan Kiszka
2018-05-03  7:15   ` Vladimir Zapolskiy
2018-04-30  5:48 ` [PATCH v2 07/10] PCI: Convert of_pci_get_host_bridge_resources() users to devm variant Jan Kiszka
2018-05-03  7:18   ` Vladimir Zapolskiy [this message]
2018-05-04 16:44     ` Lorenzo Pieralisi
2018-05-05  7:42       ` Vladimir Zapolskiy
2018-04-30  5:48 ` [PATCH v2 08/10] PCI: Deprecate of_pci_get_host_bridge_resources() Jan Kiszka
2018-05-02 12:39   ` Christoph Hellwig
2018-05-03  7:53     ` Jan Kiszka
2018-05-08 13:29       ` Bjorn Helgaas
2018-05-09 19:03         ` [PATCH v3 08/10] PCI: Remove of_pci_get_host_bridge_resources() Jan Kiszka
2018-04-30  5:48 ` [PATCH v2 09/10] PCI: Add support for unbinding the generic PCI host controller Jan Kiszka
2018-04-30  5:48 ` [PATCH v2 10/10] PCI: Enable PCI_DOMAINS along with " Jan Kiszka
2018-05-03  7:12 ` [PATCH v2 00/10] PCI: leak fixes, removable generic PCI host, assorted stuff Vladimir Zapolskiy
2018-05-03  7:52   ` Jan Kiszka
2018-05-10 22:51 ` 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=dbfa80fb-5fe8-3ccd-6886-4604ef9e058b@mentor.com \
    --to=vladimir_zapolskiy@mentor.com \
    --cc=Joao.Pinto@synopsys.com \
    --cc=bhelgaas@google.com \
    --cc=jan.kiszka@siemens.com \
    --cc=jingoohan1@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    /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).