From: Philipp Stanner <phasta@mailbox.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Philipp Stanner <phasta@kernel.org>
Cc: Jonathan Corbet <corbet@lwn.net>,
Bjorn Helgaas <bhelgaas@google.com>,
Mark Brown <broonie@kernel.org>,
David Lechner <dlechner@baylibre.com>,
Zijun Hu <quic_zijuhu@quicinc.com>,
Yang Yingliang <yangyingliang@huawei.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-pci@vger.kernel.org
Subject: Re: [PATCH 4/7] PCI: Remove request_flags relict from devres
Date: Fri, 16 May 2025 09:48:42 +0200 [thread overview]
Message-ID: <4592c50fd3168eb3319f4b24cb072e8d8357562d.camel@mailbox.org> (raw)
In-Reply-To: <aCXlWoPm2XVA5m7M@smile.fi.intel.com>
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;
> > }
>
next prev parent reply other threads:[~2025-05-16 7:58 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-15 12:45 [PATCH 0/7] PCI: Remove hybrid-devres region requests Philipp Stanner
2025-05-15 12:45 ` [PATCH 1/7] PCI: Remove hybrid devres nature from request functions Philipp Stanner
2025-05-15 12:46 ` [PATCH 2/7] Docu: PCI: Update pcim_enable_device() Philipp Stanner
2025-05-15 12:58 ` Andy Shevchenko
2025-05-16 7:49 ` Philipp Stanner
2025-05-16 13:28 ` Krzysztof Wilczyński
2025-05-16 13:41 ` Philipp Stanner
2025-05-16 13:48 ` Krzysztof Wilczyński
2025-05-17 16:32 ` Andy Shevchenko
2025-05-15 12:46 ` [PATCH 3/7] PCI: Remove pcim_request_region_exclusive() Philipp Stanner
2025-05-15 12:46 ` [PATCH 4/7] PCI: Remove request_flags relict from devres Philipp Stanner
2025-05-15 13:00 ` Andy Shevchenko
2025-05-16 7:48 ` Philipp Stanner [this message]
2025-05-15 12:46 ` [PATCH 5/7] PCI: Remove redundant set of request funcs Philipp Stanner
2025-05-15 12:46 ` [PATCH 6/7] PCI: Remove unnecessary prototype from pci.h Philipp Stanner
2025-05-15 13:02 ` Andy Shevchenko
2025-05-15 13:37 ` Philipp Stanner
2025-05-16 9:16 ` Andy Shevchenko
2025-05-15 12:46 ` [PATCH 7/7] PCI: Remove hybrid-devres hazzard warnings from doc Philipp Stanner
2025-05-15 13:08 ` [PATCH 0/7] PCI: Remove hybrid-devres region requests Andy Shevchenko
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=4592c50fd3168eb3319f4b24cb072e8d8357562d.camel@mailbox.org \
--to=phasta@mailbox.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=bhelgaas@google.com \
--cc=broonie@kernel.org \
--cc=corbet@lwn.net \
--cc=dlechner@baylibre.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=phasta@kernel.org \
--cc=quic_zijuhu@quicinc.com \
--cc=yangyingliang@huawei.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
all inboxes | Powered by JetHome®