Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp272003rdf; Tue, 21 Nov 2023 02:11:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IERFBGe9bWt/E6fSMr+yLCLxUc0Gv9Udnxscut3/Q0q7EbmyK+GuznZ12klN3zUvHXsFCtA X-Received: by 2002:a05:6a21:99a7:b0:187:3643:ecce with SMTP id ve39-20020a056a2199a700b001873643eccemr13132030pzb.56.1700561492723; Tue, 21 Nov 2023 02:11:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700561492; cv=none; d=google.com; s=arc-20160816; b=W91k2o7tNZbMQcoxT2OwGABg0smPMajlA6mZC4jMCB9p8UWEq9TNFAFHaXsyFwcO/O Wl6dHiL4FUrVRj7xb6I8DEnasEd5BOVJrpL5iK87l4f7bu+SSJwMJR5Cxijs08LkLQEU 5DItn0OtmMoMXs8lWonzd/YtDsjoYppo3Zd/etv332avsbWqNPFNuMFlWqefPBJ8W9ZQ pLRoCbg0s8EGO12xHwTtmx/N5zruGwi0CsIgPcr0vMaZA5vx6qcMWPDNlb93xj+R8/wy TswUi+GbrzvTB51DnK4yXKwd3efIKt1g8e/6PdivUi835KY8IZfxRuPE+9gf5d/T9eKR /DlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:references:in-reply-to :message-id:mime-version:user-agent:feedback-id:dkim-signature; bh=77E0ZhYcv5ATJ2lBradRqD9kbpDr7Gcs0VVDNV7VzEU=; fh=84EnaAUACVtiQIBVEUv8V/+moi6opmgSt0fDKpyYDB4=; b=kKyciyXyXaz+Ms62mH1sStC4+eVrk9cab2YhW42LqHQNx03khDtEgTKyHM3FJRzUBF CQYvoXaAA+jheYjk4d61K8+vPFAVYeL+9MfQ0yNTTmsG6SUnzZ0qXAx+hZzsyDm43k0t gvLblSkRWbLpRMlw5vOC9lEBOTaOXHl3eWDNXzo1tAAV0KHj9mmuJF33HTFjvV1pkeBp qmZ3KDtaaK1/PN6rkxqoOhf+rrO92CBn64jTzDMeT5QRD0wSiEu6dkuy8yVa8VmEl9GU e6r0IA+1s/XhlJTfdI7bpXudKWvVPhT9IM40aShIOSM7zucK6cSBrE8Yd/fHuRzlZt54 8ATQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZfZFYfxx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id ne4-20020a17090b374400b002850eff7dd6si6696474pjb.173.2023.11.21.02.11.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 02:11:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZfZFYfxx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id E891A80C6DE1; Tue, 21 Nov 2023 02:11:29 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234132AbjKUKLW (ORCPT + 99 others); Tue, 21 Nov 2023 05:11:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232600AbjKUKLU (ORCPT ); Tue, 21 Nov 2023 05:11:20 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 323FEB9 for ; Tue, 21 Nov 2023 02:11:17 -0800 (PST) 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 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 X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Tue, 21 Nov 2023 02:11:30 -0800 (PST) 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