From: "Kuppuswamy, Sathyanarayanan" <sathyanarayanan.kuppuswamy@linux.intel.com>
To: Bjorn Helgaas <helgaas@kernel.org>
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 15:08:14 -0700 [thread overview]
Message-ID: <2633439e-4017-8efb-5bde-a5e9148971d6@linux.intel.com> (raw)
In-Reply-To: <20200721215348.GA1160927@bjorn-Precision-5520>
On 7/21/20 2:53 PM, Bjorn Helgaas wrote:
> 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().
Yes. pcie_aer_is_native() should be left in AER driver.
>
> 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.
Agree with your approach. Its ok to add separate check for
pcie_aer_is_native().
>
> Bjorn
>
--
Sathyanarayanan Kuppuswamy
Linux Kernel Developer
prev parent reply other threads:[~2020-07-21 22:08 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
2020-07-21 22:08 ` Kuppuswamy, Sathyanarayanan [this message]
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=2633439e-4017-8efb-5bde-a5e9148971d6@linux.intel.com \
--to=sathyanarayanan.kuppuswamy@linux.intel.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=bhelgaas@google.com \
--cc=helgaas@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=lorenzo.pieralisi@arm.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