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