Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp275600rdf; Tue, 21 Nov 2023 02:19:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IEfETw35JWpmTfcM0YGMR6VtdUvyNl/Q3+XHOOaLyIr4azjhy+KkTIUUOv1MxGLp7GFCUdD X-Received: by 2002:a17:902:d490:b0:1cc:419e:cb4b with SMTP id c16-20020a170902d49000b001cc419ecb4bmr3133400plg.19.1700561997045; Tue, 21 Nov 2023 02:19:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700561997; cv=none; d=google.com; s=arc-20160816; b=AVhdAv6a50euc7KPb5Y/ZcK33FV3ZsA4vVsEhPx2M8vae9gAC62FH6Yc/B5UYRK7bU Pst9DLTE0bYzZvfU3hQ+eui7FftMqIC7c4R9AxO2Rne/Ysuo1GzVMSus+OMAqpPVAjRV stJ7653to3N2Og0lUqmuDNJDjP4m1thhLnb56bMRYQhxvFCvl5mZ7z9SckyFH1DVVIDI 0GuWvTI18zDfT+Hzsj2+0gkPGt0EVUtFX4dfPxDFvP/Ou12/Vc7IoqlttB8hcd0/sylL BOCnqIH9des1x3/xOQuGhTvnO8CM3BYVQP2U8a9Wax2O7z5Ow0ZWOpMgaVsMb4JFsdm7 V8VQ== 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=mnOUSG4TssrWh+hCWj1K3MpOEOUVkKfW3ExfXxs1V0Y=; fh=84EnaAUACVtiQIBVEUv8V/+moi6opmgSt0fDKpyYDB4=; b=zKaY18rd+CoEczJwFjRDd+2z6VAcNMKxt6mOEy6r31eU5HW1mnJsp4TKiL5QhrVR8j XUN6k5GL9R2BUh3ZUr035T+IxNo7x1NFeaseUzO7GEkC2oXNEooMdntycGmY3xcGdkiu IOLccZK2WtGafaQfNHzp2nEoDjpdGLZTTeZhH9Xy4AKJ7jyxVAF2xxSv09M1J2MLnvt0 W81Uyq2Y5kYBd2fARySnaRLpiq9+4i/DuuCptsEnr/ezJA75sQ2yoYw8qzKxFX6NF6C3 bfIKZu7P64dI34LHRuhpG8sC2IhlsrpuX2MBtYIX7oYLolI+dobC9vsRUBoF1YPspbqe clDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=i1J8Vxsz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id f18-20020a170902e99200b001c5e1c94588si9510683plb.550.2023.11.21.02.19.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 02:19:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=i1J8Vxsz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id C4EFE8048E6B; Tue, 21 Nov 2023 02:19:53 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233677AbjKUKTf (ORCPT + 99 others); Tue, 21 Nov 2023 05:19:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233336AbjKUKTL (ORCPT ); Tue, 21 Nov 2023 05:19:11 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 684E3270D for ; Tue, 21 Nov 2023 02:18:17 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3D425C433CA; Tue, 21 Nov 2023 10:18:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700561896; bh=x6Eqbz8ebjzAvuYM7IREObhQffM7Tdw0BiU0JcMcJaM=; h=In-Reply-To:References:Date:From:To:Cc:Subject:From; b=i1J8VxszY8stYNc2J6hbxymc8CL0cxA0qmZjcGGdREWyxSoveVywF3enOP7eR2RiH K9wZU+618aNk5T0LbO7rRs2/GwSoqSHr4iD6ycHY888m/tc8rTc+MDIlJNPZCLEI4B /CmjWa4NYbKQ91Ebv5q4f16zaaIUJEBDREUtNsDwkKYUoBtZMceovdElqn2bDemDCZ IDLw8fXAbFSmvUoijoaYfanuQEGZKEmN/o2QpUsfGEM6s5mAySVWWW1iYvLXu6R7I7 fG5NV5KkP9hj73LD0aSYP48RJg6CK+WCvppADOn9lSDTbs0OembWyTxdWNpRgziKsu ugd7H+qNNl0eQ== Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailauth.nyi.internal (Postfix) with ESMTP id 3F0F727C0054; Tue, 21 Nov 2023 05:18:15 -0500 (EST) Received: from imap51 ([10.202.2.101]) by compute5.internal (MEProxy); Tue, 21 Nov 2023 05:18:15 -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 48412B60089; Tue, 21 Nov 2023 05:18:14 -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: <3bc69019-7867-4f51-806d-02bf85a3cbf9@app.fastmail.com> In-Reply-To: <20231120215945.52027-5-pstanner@redhat.com> References: <20231120215945.52027-2-pstanner@redhat.com> <20231120215945.52027-5-pstanner@redhat.com> Date: Tue, 21 Nov 2023 11:17:52 +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 3/4] pci: move devres code from pci.c to devres.c 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 groat.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 (groat.vger.email [0.0.0.0]); Tue, 21 Nov 2023 02:19:54 -0800 (PST) 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 > Signed-off-by: Philipp Stanner > --- > 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