public inbox for linux-pci@vger.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: "Kuppuswamy,
	Sathyanarayanan"  <sathyanarayanan.kuppuswamy@linux.intel.com>
Cc: linux-pci@vger.kernel.org,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	Sean Kelley <sean.v.kelley@linux.intel.com>,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	linuxarm@huawei.com, Bjorn Helgaas <bhelgaas@google.com>
Subject: Re: [PATCH] PCI/ERR: Rename pci_aer_clear_device_status() to pcie_clear_device_status()
Date: Tue, 21 Jul 2020 16:53:48 -0500	[thread overview]
Message-ID: <20200721215348.GA1160927@bjorn-Precision-5520> (raw)
In-Reply-To: <0cee203b-3ba9-3e42-0caa-92d12b9086fe@linux.intel.com>

On Fri, Jul 17, 2020 at 01:20:22PM -0700, Kuppuswamy, Sathyanarayanan wrote:
> Hi Bjorn,
> 
> On 7/17/20 12:56 PM, Bjorn Helgaas wrote:
> > From: Bjorn Helgaas <bhelgaas@google.com>
> > 
> > pci_aer_clear_device_status() clears the error bits in the PCIe Device
> > Status Register (PCI_EXP_DEVSTA).  Every PCIe device has this register,
> > regardless of whether it supports AER.
>
> Since its not related to AER, can we move it out of AER driver ? May be
> to pci.c ?

OK.  pci.c is really a grab bag of random stuff, but it *is* true that
this doesn't really seem to belong in aer.c.

So I don't mind moving it to pci.c (does just before
pcie_clear_root_pme_status() seem like a reasonable spot?)

But looking at this again makes me wonder whether putting the
pcie_aer_is_native() test inside pcie_clear_device_status() is the
right thing.  It seems like that test fits better with the AER code,
i.e., in the *callers* of pcie_clear_device_status().

It would mean repeating the test, since we call it twice, but it seems
like it might match up with the spec better.  And I have a slight
aversion to functions that can silently return without doing what it
looks like they're supposed to do.

I can fix this all up if that seems right.  Or let me know if you have
alternate ideas.

Bjorn

  reply	other threads:[~2020-07-21 21:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-17 19:56 [PATCH] PCI/ERR: Rename pci_aer_clear_device_status() to pcie_clear_device_status() Bjorn Helgaas
2020-07-17 20:20 ` Kuppuswamy, Sathyanarayanan
2020-07-21 21:53   ` Bjorn Helgaas [this message]
2020-07-21 22:08     ` Kuppuswamy, Sathyanarayanan

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=20200721215348.GA1160927@bjorn-Precision-5520 \
    --to=helgaas@kernel.org \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=bhelgaas@google.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=sathyanarayanan.kuppuswamy@linux.intel.com \
    --cc=sean.v.kelley@linux.intel.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