From: Bjorn Helgaas <helgaas@kernel.org>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
linux-pci@vger.kernel.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 3/6] PCI: Introduce devm_of_pci_get_host_bridge_resources
Date: Mon, 30 Apr 2018 13:40:07 -0500 [thread overview]
Message-ID: <20180430184007.GC95643@bhelgaas-glaptop.roam.corp.google.com> (raw)
In-Reply-To: <869a8ad9-dd2f-8462-c0c4-2d8a62d74185@siemens.com>
On Sat, Apr 28, 2018 at 09:28:47AM +0200, Jan Kiszka wrote:
> On 2018-04-28 00:24, Bjorn Helgaas wrote:
> > On Tue, Apr 24, 2018 at 05:13:39PM +0200, Jan Kiszka wrote:
> >> 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, introduce a
> >> managed version of that service. This differs API-wise only in taking a
> >> reference to the associated device, rather than to the device tree node.
> >>
> >> As of_pci_get_host_bridge_resources is an exported interface, we cannot
> >> simply drop it at this point. After converting all in-tree users to the
> >> new API, we could phase out the unmanaged one over some grace period.
> >
> > It looks like it might be possible to split this into three or four
> > patches:
> >
> > 1) Factor __of_pci_get_host_bridge_resources() out of
> > of_pci_get_host_bridge_resources()
> >
> > 2) Add struct device * argument
> >
> > 3) Convert pr_info() to dev_info()
> >
> > 4) Add devm_of_pci_get_host_bridge_resources()
>
> Will do. I'm even considering
>
> 5) mark of_pci_get_host_bridge_resources() __deprecated, due to the leak
> and no remaining in-tree user - what do you think?
Sounds good.
It'd be nice if we had some guideline about deprecation -- whether we
actually need to mark things __deprecated, and then how long to wait
before actually removing them, but I don't see anything in
Documentation/.
Looks like it was added by cbe4097f8ae6 ("of/pci: Add support for
parsing PCI host bridge resources from DT") in v3.18, so it's been
around for a while and I guess it would be nice to have a grace period
before removing it.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2018-04-30 18:40 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-24 15:13 [PATCH 0/6] PCI: leak fixes, removable generic PCI host, assorted stuff Jan Kiszka
2018-04-24 15:13 ` [PATCH 1/6] PCI: Make pci_get_new_domain_nr static Jan Kiszka
2018-04-25 16:27 ` Lorenzo Pieralisi
2018-04-25 17:21 ` Jan Kiszka
2018-04-24 15:13 ` [PATCH 2/6] PCI: Fix memory leak of devm_pci_alloc_host_bridge Jan Kiszka
2018-04-24 15:13 ` [PATCH 3/6] PCI: Introduce devm_of_pci_get_host_bridge_resources Jan Kiszka
2018-04-25 10:40 ` Jan Kiszka
2018-04-27 22:24 ` Bjorn Helgaas
2018-04-28 7:28 ` Jan Kiszka
2018-04-30 18:40 ` Bjorn Helgaas [this message]
2018-04-30 18:43 ` Sinan Kaya
2018-05-02 5:39 ` Jan Kiszka
2018-04-24 15:13 ` [PATCH 4/6] PCI: Convert of_pci_get_host_bridge_resources users to devm variant Jan Kiszka
2018-04-25 19:47 ` Jingoo Han
2018-04-24 15:13 ` [PATCH 5/6] PCI: Add support for unbinding the generic PCI host controller Jan Kiszka
2018-04-24 15:13 ` [PATCH 6/6] arm: Allow to enable PCI_DOMAINS manually Jan Kiszka
2018-04-25 17:54 ` Lorenzo Pieralisi
2018-04-26 7:19 ` Jan Kiszka
2018-04-27 22:16 ` [PATCH 0/6] 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=20180430184007.GC95643@bhelgaas-glaptop.roam.corp.google.com \
--to=helgaas@kernel.org \
--cc=bhelgaas@google.com \
--cc=jan.kiszka@siemens.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).