linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lukas Wunner <lukas@wunner.de>
To: Bjorn Helgaas <bhelgaas@google.com>
Cc: Bjorn Helgaas <helgaas@kernel.org>, linux-pci@vger.kernel.org
Subject: Re: [RFC PATCH v1 0/9] PCI/portdrv: Squash into one file
Date: Sun, 10 Jun 2018 18:23:29 +0200	[thread overview]
Message-ID: <20180610162329.GA30241@wunner.de> (raw)
In-Reply-To: <CAErSpo68YimHfzyLC6CqukPGb=5di6oMFth1rG3Ub3ZwVha7=g@mail.gmail.com>

[cc += linux-pci, sorry, forgot to copy the list when first replying to
your message, I hope this is appropriate]

On Fri, Jun 08, 2018 at 04:06:39PM -0500, Bjorn Helgaas wrote:
> On Fri, Jun 8, 2018 at 3:38 PM Lukas Wunner <lukas@wunner.de> wrote:
> > On Fri, Jun 08, 2018 at 03:12:00PM -0500, Bjorn Helgaas wrote:
> > > The portdrv code is scattered across several files, which makes it a bit
> > > of a hassle to browse.  Consolidate it all in a single file.
> >
> > Why?  By that logic we could concatinate the whole kernel into a single
> > file.  The rationale of splitting into multiple files is to separate
> > distinct components.  In the case of portdrv, this means separating
> > the portion that interfaces with the PCI core (for the port's pci_dev)
> > from the portion that interfaces with the service drivers.
> 
> My experience with portdrv and AER and all the hotplug drivers is that
> I want to look at something but I don't know the exact name.  For
> example, I might want to look at the interrupt handling code.  One
> plausible way is to start up cscope, search for files "aer/aer", guess
> which file contains it, find it's wrong, try the next one, etc.  If I
> were smarter I suppose I would search for callers of request_irq() and
> grep out "aer".  But that all feels like a hassle.

"git grep" does a pretty good job for me to locate stuff like this, e.g.:

Locate request_irq in all of AER:
git grep request_irq drivers/pci/pcie/aer
(the aer directory can be omitted if you first cd into it)

Locate request_irq in all of AER in Linus' current tree:
git grep request_irq torvalds/master -- drivers/pci/pcie/aer
(assuming that the git remote of Linus' tree is named "torvalds")

Use -e if you grep for something prefixed with a dash, such as callback
invocations:
git grep -e '->reset_slot' drivers/pci

If you're in a subdirectory but would like to search the entire tree:
git grep -e '->reset_slot' :/

And so on...

  parent reply	other threads:[~2018-06-10 16:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-08 20:12 [RFC PATCH v1 0/9] PCI/portdrv: Squash into one file Bjorn Helgaas
2018-06-08 20:12 ` [PATCH v1 1/9] PCI/portdrv: Rename resume_iter() to prevent name collision Bjorn Helgaas
2018-06-08 20:12 ` [PATCH v1 2/9] PCI/portdrv: Squash pieces of portdrv_core.c into portdrv_pci.c Bjorn Helgaas
2018-06-08 20:12 ` [PATCH v1 3/9] PCI/portdrv: Squash PM-related code " Bjorn Helgaas
2018-06-08 20:12 ` [PATCH v1 4/9] PCI/portdrv: Squash device removal " Bjorn Helgaas
2018-06-08 20:12 ` [PATCH v1 5/9] PCI/portdrv: Squash lookup interfaces " Bjorn Helgaas
2018-06-08 20:12 ` [PATCH v1 6/9] PCI/portdrv: Squash service driver registration " Bjorn Helgaas
2018-06-08 20:12 ` [PATCH v1 7/9] PCI/portdrv: Move private definitions to portdrv_pci.c Bjorn Helgaas
2018-06-08 20:12 ` [PATCH v1 8/9] PCI/portdrv: Clean up whitespace Bjorn Helgaas
2018-06-08 20:12 ` [PATCH v1 9/9] PCI/portdrv: Rename portdrv_pci.c to portdrv.c Bjorn Helgaas
     [not found] ` <20180608203810.GA19717@wunner.de>
     [not found]   ` <CAErSpo68YimHfzyLC6CqukPGb=5di6oMFth1rG3Ub3ZwVha7=g@mail.gmail.com>
2018-06-10 16:23     ` Lukas Wunner [this message]
2018-06-11 13:24       ` [RFC PATCH v1 0/9] PCI/portdrv: Squash into one file Bjorn Helgaas
2018-06-11  8:17 ` poza

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=20180610162329.GA30241@wunner.de \
    --to=lukas@wunner.de \
    --cc=bhelgaas@google.com \
    --cc=helgaas@kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).