[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4592c50fd3168eb3319f4b24cb072e8d8357562d.camel@mailbox.org>
Date: Fri, 16 May 2025 09:48:42 +0200
From: Philipp Stanner <phasta@...lbox.org>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>, Philipp Stanner
<phasta@...nel.org>
Cc: Jonathan Corbet <corbet@....net>, Bjorn Helgaas <bhelgaas@...gle.com>,
Mark Brown <broonie@...nel.org>, David Lechner <dlechner@...libre.com>,
Zijun Hu <quic_zijuhu@...cinc.com>, Yang Yingliang
<yangyingliang@...wei.com>, Greg Kroah-Hartman
<gregkh@...uxfoundation.org>, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org
Subject: Re: [PATCH 4/7] PCI: Remove request_flags relict from devres
On Thu, 2025-05-15 at 16:00 +0300, Andy Shevchenko wrote:
> On Thu, May 15, 2025 at 02:46:02PM +0200, Philipp Stanner wrote:
> > pcim_request_region_exclusive(), the only user in PCI devres that
> > needed
> > exclusive region requests, has been removed.
> >
> > All features related to exclusive requests can, therefore, be
> > removed,
> > too. Remove them.
>
> ...
>
> > int pcim_request_region(struct pci_dev *pdev, int bar, const char
> > *name)
> > {
> > - return _pcim_request_region(pdev, bar, name, 0);
> > + int ret;
> > + struct pcim_addr_devres *res;
> > +
> > + if (!pci_bar_index_is_valid(bar))
> > + return -EINVAL;
> > +
> > + res = pcim_addr_devres_alloc(pdev);
> > + if (!res)
> > + return -ENOMEM;
> > + res->type = PCIM_ADDR_DEVRES_TYPE_REGION;
> > + res->bar = bar;
> > +
> > + ret = __pcim_request_region(pdev, bar, name, 0);
>
> > + if (ret != 0) {
>
> While at it, drop the ' != 0' part?
I want it to be clear to be just a pure code move. It's a shame that
the git-diff can't just handle that through the function head,
resulting in a +/-2 diff
Style adjustments, which might also be necessary in pci.c in many
places, could be done through dedicated commits.
P.
>
> > + pcim_addr_devres_free(res);
> > + return ret;
> > + }
> > +
> > + devres_add(&pdev->dev, res);
> > + return 0;
> > }
>
Powered by blists - more mailing lists