On Sat, May 17, 2014 at 5:29 AM, Robert P. J. Day <rpjday@xxxxxxxxxxxxxx> wrote: > > digging through the current PCI code and Kconfig files and it seems > like some of that could be made simpler, but i'm willing to be > convinced otherwise. I'm sure it could be cleaned up, and it would be great if you did! I don't know the reason why all the arches source drivers/pci/pcie/Kconfig directly; it seems like that should be done from drivers/pci/Kconfig. > first, from arch/x86/Kconfig, rather than simply sourcing the file > "drivers/pci/Kconfig" (as is done with many other drivers > directories), that Kconfig file defines: > > menu "Bus options (PCI etc.)" > > config PCI > bool "PCI support" > default y > ... snip ... > > and later on, sources the Kconfig files for PCI and PCIe individually: > > source "drivers/pci/pcie/Kconfig" > > source "drivers/pci/Kconfig" > > and even further down, finally sources the file for PCI hotplug after > PCMCIA: > > source "drivers/pcmcia/Kconfig" > > source "drivers/pci/hotplug/Kconfig" > > given the dependencies, could all of this not be encapsulated in the > top-level Kconfig files under drivers/pci? > > next, in drivers/Makefile, pci code is pulled in with the single > statement: > > obj-$(CONFIG_PCI) += pci/ > > given that, can't one drop all the "depends on PCI" directives from > the file drivers/pci/Kconfig? or just wrap the whole file in a "if > PCI" test? (unless there's something i'm missing here.) > > and could the same thing not be said for the pcie/ subdirectory? > drivers/pci/Makefile contains the line: > > obj-$(CONFIG_PCIEPORTBUS) += pcie/ > > with the dependency in drivers/pci/pcie/Kconfig: > > config PCIEPORTBUS > bool "PCI Express Port Bus support" > depends on PCI > > suggesting that drivers/pci/pcie/Kconfig could also be simplified > quite a bit by dropping redundant dependency directives. > > thoughts? I don't know all the history behind what we have now, so I can't give you much advice. I think you just have to work through the process of simplifying things and see whether it turns out to be feasible. Bjorn -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html