[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <3bc69019-7867-4f51-806d-02bf85a3cbf9@app.fastmail.com>
Date: Tue, 21 Nov 2023 11:17:52 +0100
From: "Arnd Bergmann" <arnd@...nel.org>
To: "Philipp Stanner" <pstanner@...hat.com>,
"Bjorn Helgaas" <bhelgaas@...gle.com>,
"Andrew Morton" <akpm@...ux-foundation.org>,
"Randy Dunlap" <rdunlap@...radead.org>,
"Jason Gunthorpe" <jgg@...pe.ca>,
"Eric Auger" <eric.auger@...hat.com>,
"Kent Overstreet" <kent.overstreet@...il.com>,
"Niklas Schnelle" <schnelle@...ux.ibm.com>,
"Neil Brown" <neilb@...e.de>, "John Sanpe" <sanpeqf@...il.com>,
"Dave Jiang" <dave.jiang@...el.com>,
"Yury Norov" <yury.norov@...il.com>,
"Kees Cook" <keescook@...omium.org>,
"Masami Hiramatsu" <mhiramat@...nel.org>,
"David Gow" <davidgow@...gle.com>,
"Herbert Xu" <herbert@...dor.apana.org.au>,
"Thomas Gleixner" <tglx@...utronix.de>,
"wuqiang.matt" <wuqiang.matt@...edance.com>,
"Jason Baron" <jbaron@...mai.com>,
"Ben Dooks" <ben.dooks@...ethink.co.uk>,
"Danilo Krummrich" <dakr@...hat.com>
Cc: linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org
Subject: Re: [PATCH 3/4] pci: move devres code from pci.c to devres.c
On Mon, Nov 20, 2023, at 22:59, Philipp Stanner wrote:
> The file pci.c is very large and contains a number of devres-functions.
> These functions should now reside in devres.c
>
> There are a few callers left in pci.c that do devres operations. These
> should be ported in the future. Corresponding TODOs are added by this
> commit.
>
> The reason they are not moved right now in this commit is that pci's
> devres currently implements a sort of "hybrid-mode":
> pci_request_region(), for instance, does not have a corresponding pcim_
> equivalent, yet. Instead, the function can be made managed by previously
> calling pcim_enable_device() (instead of pci_enable_device()). This
> makes it unreasonable to move pci_request_region() to devres.c
> Moving the functions would require changes to pci's API and is,
> therefore, left for future work.
>
> Move as much devres-specific code from pci.c to devres.c as possible.
>
> Suggested-by: Danilo Krummrich <dakr@...hat.com>
> Signed-off-by: Philipp Stanner <pstanner@...hat.com>
> ---
> drivers/pci/devres.c | 243 +++++++++++++++++++++++++++++++++++++++++
> drivers/pci/pci.c | 249 -------------------------------------------
> drivers/pci/pci.h | 24 +++++
> 3 files changed, 267 insertions(+), 249 deletions(-)
I had just commented in the other mail that you'd have to move
these functions to devres.c for the file to make sense, but that
I think the existing state is better.
Just to clarify again here: this patch does not seem to improve
anything to me, I'd much prefer leaving it the way it is, and
moving the pcim_iomap family to corresponding drivers/pci/iomap.c.
Arnd
Powered by blists - more mailing lists