[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <f4cded7b-c62a-453e-b09f-6fe39b4a9c1a@app.fastmail.com>
Date: Tue, 21 Nov 2023 11:10:41 +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 2/4] lib: move pci-specific devres code to drivers/pci/
On Tue, Nov 21, 2023, at 09:00, Philipp Stanner wrote:
> On Tue, 2023-11-21 at 08:29 +0100, Arnd Bergmann wrote:
>> On Mon, Nov 20, 2023, at 22:59, Philipp Stanner wrote:
>>
>> Since you are moving the pci_iomap() code into drivers/pci/ already,
>> I'd suggest merging this one into the same file and keep the two
>> halves of this interface together.
>
>
> I'd argue that they are as much together as they were before:
>
> Previously:
> * PCI-IOMAP-code in folder lib/ in its own file (pci_iomap.c)
> * PCI-Devres-code in folder lib/ in a distinct file (devres.c)
>
> Now:
> * PCI-IOMAP-code in folder drivers/pci/ in its own file (iomap.c)
> * PCI-Devres-code in folder drivers/pci/ in its own file (devres.c)
>
> Or am I misunderstanding something?
They are indeed closer together now, just not in the same file.
Looking across subsystems at the output of
git grep -l EXPORT.*devm
I see that 10 out of 182 files have split the devres functions
into a separate file, while the others just keep the devm_*
function in the same place as the normal one. Since you never
have one of these files without the other, and they do
almost the exact same thing, a single file is the simpler
option.
Note that there are also three pcim_*() functions in
drivers/pci/pci.c. I think that is the correct place for
them, but if you wanted to split out pci devres functions
into a separate file, they would now also have to go
into drivers/pci/devres.c.
Arnd
Powered by blists - more mailing lists