[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <b0183c5d-3fbc-3823-e653-31e3999ca5ca@linux.intel.com>
Date: Sun, 5 Jan 2025 18:43:07 +0200 (EET)
From: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To: Lukas Wunner <lukas@...ner.de>
cc: linux-pci@...r.kernel.org, Bjorn Helgaas <bhelgaas@...gle.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Rob Herring <robh@...nel.org>, Krzysztof Wilczy??ski <kw@...ux.com>,
"Maciej W . Rozycki" <macro@...am.me.uk>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>,
Alexandru Gagniuc <mr.nuke.me@...il.com>,
Krishna chaitanya chundru <quic_krichai@...cinc.com>,
Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
"Rafael J . Wysocki" <rafael@...nel.org>, linux-pm@...r.kernel.org,
Smita Koralahalli <Smita.KoralahalliChannabasappa@....com>,
LKML <linux-kernel@...r.kernel.org>,
Daniel Lezcano <daniel.lezcano@...aro.org>,
Amit Kucheria <amitk@...nel.org>, Zhang Rui <rui.zhang@...el.com>,
Christophe JAILLET <christophe.jaillet@...adoo.fr>
Subject: Re: [PATCH v9 7/9] PCI/bwctrl: Add API to set PCIe Link Speed
On Thu, 2 Jan 2025, Lukas Wunner wrote:
> On Fri, Oct 18, 2024 at 05:47:53PM +0300, Ilpo Järvinen wrote:
> > @@ -142,9 +304,11 @@ static int pcie_bwnotif_probe(struct pcie_device *srv)
> > if (ret)
> > return ret;
> >
> > - scoped_guard(rwsem_write, &pcie_bwctrl_lbms_rwsem) {
> > - port->link_bwctrl = no_free_ptr(data);
> > - pcie_bwnotif_enable(srv);
> > + scoped_guard(rwsem_write, &pcie_bwctrl_setspeed_rwsem) {
> > + scoped_guard(rwsem_write, &pcie_bwctrl_lbms_rwsem) {
> > + port->link_bwctrl = no_free_ptr(data);
> > + pcie_bwnotif_enable(srv);
> > + }
> > }
>
> The "data" pointer is allocated with devm_kzalloc().
> There's no __free(kfree) anywhere.
>
> So what's the motivation for the no_free_ptr()?
> Is this a remnant of an earlier version of the patch set that can be deleted
> or is there actually a purpose to it?
Remnant it was so it is okay to remove it in your fix.
--
i.
Powered by blists - more mailing lists