All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Robert P. J. Day" <rpjday@crashcourse.ca>
To: Linux PCI mailing list <linux-pci@vger.kernel.org>
Subject: could the [x86] Kconfig content for PCI be cleaned up at all?
Date: Sat, 17 May 2014 07:29:53 -0400 (EDT)	[thread overview]
Message-ID: <alpine.LFD.2.11.1405170706260.536@localhost> (raw)


  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.

  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?

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================





             reply	other threads:[~2014-05-17 12:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-17 11:29 Robert P. J. Day [this message]
2014-05-17 17:31 ` could the [x86] Kconfig content for PCI be cleaned up at all? Bjorn Helgaas
2014-05-18  7:14   ` Robert P. J. Day
2014-05-19  6:59   ` Robert P. J. Day
2014-05-19 13:17     ` Bjorn Helgaas

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=alpine.LFD.2.11.1405170706260.536@localhost \
    --to=rpjday@crashcourse.ca \
    --cc=linux-pci@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.