From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EF27638FB1 for ; Tue, 21 Nov 2023 10:11:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZfZFYfxx" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D7398C433C7; Tue, 21 Nov 2023 10:11:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700561476; bh=pwVt1w2LCBRnUv5jOmI2812LEvoFjTvS4hIHofg4Jas=; h=In-Reply-To:References:Date:From:To:Cc:Subject:From; b=ZfZFYfxxS0kEHfQDfWXH7ireMlOgqyx0yaQJpgectuibgt0G+FYx8HopU8/OaKkz5 gwTPcWEuCRVaCMTRvG2KtNLyFRnPUT1suQ177UA3k4kPlnuDBTJWdemwwyPyuZJcZe OChqB/BfYEZOCrB+0gwXyXTx9IeCctN/En00qnrUbSO/pfSK2DaEajRnqsYDORzw/T TnlaxAL7RX+th+wCKBklOyVpclKZPe4/JvYWoaX2wCh9iuTQod8xXeHJzIvDWdoWPH MfeqPSklfM2dKl47JXR25E9f9KFSIICu2K0ZCHHSP3mduSOyVkdVmVIcgmf2YgxAKd INCwXxdSIhk6Q== Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailauth.nyi.internal (Postfix) with ESMTP id B7F6C27C005B; Tue, 21 Nov 2023 05:11:14 -0500 (EST) Received: from imap51 ([10.202.2.101]) by compute5.internal (MEProxy); Tue, 21 Nov 2023 05:11:14 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudegledguddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsehttdertderredtnecuhfhrohhmpedftehr nhguuceuvghrghhmrghnnhdfuceorghrnhgusehkvghrnhgvlhdrohhrgheqnecuggftrf grthhtvghrnhepvdeviefgtedugeevieelvdfgveeuvdfgteegfeeiieejjeffgeeghedu gedtveehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh eprghrnhguodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdduvdekhedujedt vdegqddvkeejtddtvdeigedqrghrnhgupeepkhgvrhhnvghlrdhorhhgsegrrhhnuggsrd guvg X-ME-Proxy: Feedback-ID: i36794607:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 6C63CB60089; Tue, 21 Nov 2023 05:11:13 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-1178-geeaf0069a7-fm-20231114.001-geeaf0069 Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: In-Reply-To: References: <20231120215945.52027-2-pstanner@redhat.com> <20231120215945.52027-4-pstanner@redhat.com> <45997863-d817-48c7-ad46-8b47f5e0ce61@app.fastmail.com> Date: Tue, 21 Nov 2023 11:10:41 +0100 From: "Arnd Bergmann" To: "Philipp Stanner" , "Bjorn Helgaas" , "Andrew Morton" , "Randy Dunlap" , "Jason Gunthorpe" , "Eric Auger" , "Kent Overstreet" , "Niklas Schnelle" , "Neil Brown" , "John Sanpe" , "Dave Jiang" , "Yury Norov" , "Kees Cook" , "Masami Hiramatsu" , "David Gow" , "Herbert Xu" , "Thomas Gleixner" , "wuqiang.matt" , "Jason Baron" , "Ben Dooks" , "Danilo Krummrich" Cc: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Subject: Re: [PATCH 2/4] lib: move pci-specific devres code to drivers/pci/ Content-Type: text/plain 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