From: Lukas Wunner <lukas@wunner.de>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: Shawn Anastasio <sanastasio@raptorengineering.com>,
Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>,
Krzysztof Wilczy??ski <kw@linux.com>,
Jonathan Cameron <Jonathan.Cameron@huawei.com>,
Bjorn Helgaas <bhelgaas@google.com>,
linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org
Subject: Re: [PATCH 1/1] PCI: pciehp: Consolidate code files
Date: Mon, 12 May 2025 15:47:40 +0200 [thread overview]
Message-ID: <aCH7_J4GE112pyCc@wunner.de> (raw)
In-Reply-To: <20250512124531.8937-1-ilpo.jarvinen@linux.intel.com>
On Mon, May 12, 2025 at 03:45:28PM +0300, Ilpo Järvinen wrote:
> The code in the pciehp driver is a bit painful to read because of the
> criss-cross calls that cross file boundaries making the split to
> multiple files feel quite artificial.
>
> Consolidate the code into single pciehp.c. The split files are not
> simply merged as is but the functions are grouped based on
> functionality and order that avoids most forward declarations.
[...]
> drivers/pci/hotplug/Makefile | 5 -
> drivers/pci/hotplug/pciehp.c | 2151 +++++++++++++++++++++++++++++
> drivers/pci/hotplug/pciehp.h | 212 ---
> drivers/pci/hotplug/pciehp_core.c | 383 -----
> drivers/pci/hotplug/pciehp_ctrl.c | 445 ------
> drivers/pci/hotplug/pciehp_hpc.c | 1123 ---------------
> drivers/pci/hotplug/pciehp_pci.c | 141 --
> 7 files changed, 2151 insertions(+), 2309 deletions(-)
Ugh, I understand that the current state is suboptimal to grok the code,
but a single file with 2000+ LoC isn't much better in terms of
maintainability. I think partitioning the code into separate files
does make sense, just the current (historically grown) structure
can be improved upon. Let me think what a more logical separation
might look like...
Thanks,
Lukas
prev parent reply other threads:[~2025-05-12 13:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-12 12:45 [PATCH 1/1] PCI: pciehp: Consolidate code files Ilpo Järvinen
2025-05-12 13:47 ` Lukas Wunner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aCH7_J4GE112pyCc@wunner.de \
--to=lukas@wunner.de \
--cc=Jonathan.Cameron@huawei.com \
--cc=bhelgaas@google.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=krishna.chundru@oss.qualcomm.com \
--cc=kw@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=sanastasio@raptorengineering.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox