All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Tauro, Riana" <riana.tauro@intel.com>
To: "Bowman, Terry" <terry.bowman@amd.com>,
	Lukas Wunner <lukas@wunner.de>,
	Bjorn Helgaas <helgaas@kernel.org>,
	Raag Jadav <raag.jadav@intel.com>,
	"Yury Murashka" <yurypm@arista.com>,
	Matthew W Carlis <mattc@purestorage.com>,
	<linux-pci@vger.kernel.org>
Cc: Mahesh J Salgaonkar <mahesh@linux.ibm.com>,
	Oliver OHalloran <oohall@gmail.com>,
	<linuxppc-dev@lists.ozlabs.org>,
	Aravind Iddamsetty <aravind.iddamsetty@intel.com>,
	Srinivasa Adatrao <srinivasa.adatrao@intel.com>,
	Sathyanarayanan Kuppuswamy
	<sathyanarayanan.kuppuswamy@linux.intel.com>,
	Keith Busch <kbusch@kernel.org>
Subject: Re: [PATCH 4/7] PCI/AER: Drop AER native check from handles_cxl_errors()
Date: Mon, 16 Nov 2026 19:36:21 +0530	[thread overview]
Message-ID: <f6f6c126-cfbe-4e67-8002-c11cf6f84189@intel.com> (raw)
In-Reply-To: <2604b3c2-4c6e-453c-b7be-d7ff6be1dbb0@amd.com>

On 29-09-2026 02:28, Bowman, Terry wrote:

> On 9/27/2026 1:02 PM, Lukas Wunner wrote:
>> Drop a superfluous call to pcie_aer_is_native() from handles_cxl_errors().
>>
>> The call is superfluous because the function is only called from:
>>
>>    aer_probe()
>>      cxl_rch_enable_rcec()
>>        handles_cxl_errors()
>>
>> ...and aer_probe() is only invoked if an AER port service was instantiated
>> in get_port_device_capability(), which is conditional on:
>>
>>    (pci_pcie_type(dev) == PCI_EXP_TYPE_ROOT_PORT ||
>>     pci_pcie_type(dev) == PCI_EXP_TYPE_RC_EC) &&
>>    pci_aer_available() &&
>>    dev->aer_cap && (pcie_ports_native || host->native_aer))
>>
>> ...and the last line of those conditions is equivalent to
>> pcie_aer_is_native().

Since pcie_aer_is_native() is a generic PCIe helper that could be reused 
by other consumers,
could we also remove the CXL namespace from its export?

Riana

>>
>> Signed-off-by: Lukas Wunner <lukas@wunner.de>
>> ---
>>   drivers/pci/pcie/aer_cxl_rch.c | 3 +--
>>   1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/drivers/pci/pcie/aer_cxl_rch.c b/drivers/pci/pcie/aer_cxl_rch.c
>> index e471eefec9c4..9cc2d5749b9d 100644
>> --- a/drivers/pci/pcie/aer_cxl_rch.c
>> +++ b/drivers/pci/pcie/aer_cxl_rch.c
>> @@ -87,8 +87,7 @@ static bool handles_cxl_errors(struct pci_dev *rcec)
>>   {
>>   	bool handles_cxl = false;
>>   
>> -	if (pci_pcie_type(rcec) == PCI_EXP_TYPE_RC_EC &&
>> -	    pcie_aer_is_native(rcec))
>> +	if (pci_pcie_type(rcec) == PCI_EXP_TYPE_RC_EC)
>>   		pcie_walk_rcec(rcec, handles_cxl_error_iter, &handles_cxl);
>>   
>>   	return handles_cxl;
>
> Nice cleanup. The pcie_aer_is_native() check isn't necessary. You can add my RB.
>
> Reviewed-by: Terry Bowman <terry.bowman@amd.com>
>
> -Terry

  reply	other threads:[~2026-11-16 14:07 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-27 18:02 [PATCH 0/7] Error reporting for AER-incapable devices Lukas Wunner
2026-09-27 18:02 ` [PATCH 1/7] PCI/DPC: Avoid access to non-existent AER capability Lukas Wunner
2026-09-27 18:27   ` sashiko-bot
2026-09-29 18:49   ` Kuppuswamy Sathyanarayanan
2026-11-15 17:49     ` Lukas Wunner
2026-09-27 18:02 ` [PATCH 2/7] PCI/DPC: Reinstate support for AER-incapable ports Lukas Wunner
2026-09-27 18:26   ` sashiko-bot
2026-09-29 19:04   ` Kuppuswamy Sathyanarayanan
2026-11-15 18:07     ` Lukas Wunner
2026-09-27 18:02 ` [PATCH 3/7] PCI/ERR: Avoid stale error status bits on recovery failure Lukas Wunner
2026-09-27 18:31   ` sashiko-bot
2026-09-27 18:57     ` Lukas Wunner
2026-09-29 19:20   ` Kuppuswamy Sathyanarayanan
2026-09-27 18:02 ` [PATCH 4/7] PCI/AER: Drop AER native check from handles_cxl_errors() Lukas Wunner
2026-09-27 18:26   ` sashiko-bot
2026-09-28 20:58   ` Bowman, Terry
2026-11-16 14:06     ` Tauro, Riana [this message]
2026-11-16 16:54       ` Lukas Wunner
2026-09-29 19:24   ` Kuppuswamy Sathyanarayanan
2026-09-27 18:02 ` [PATCH 5/7] PCI/AER: Move AER capability check out of pcie_aer_is_native() Lukas Wunner
2026-09-27 18:30   ` sashiko-bot
2026-09-29 19:47   ` Kuppuswamy Sathyanarayanan
2026-11-16 11:58     ` Lukas Wunner
2026-09-27 18:02 ` [PATCH 6/7] PCI/AER: Renumber severity constants Lukas Wunner
2026-09-27 18:29   ` sashiko-bot
2026-09-27 19:23     ` Lukas Wunner
2026-09-29 19:55   ` Kuppuswamy Sathyanarayanan
2026-09-27 18:02 ` [PATCH 7/7] PCI/AER: Enable baseline capability error reporting Lukas Wunner
2026-09-27 18:33   ` sashiko-bot
2026-09-29 21:01   ` Kuppuswamy Sathyanarayanan
2026-09-30  7:08     ` Lukas Wunner
2026-10-01 17:44       ` 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=f6f6c126-cfbe-4e67-8002-c11cf6f84189@intel.com \
    --to=riana.tauro@intel.com \
    --cc=aravind.iddamsetty@intel.com \
    --cc=helgaas@kernel.org \
    --cc=kbusch@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=lukas@wunner.de \
    --cc=mahesh@linux.ibm.com \
    --cc=mattc@purestorage.com \
    --cc=oohall@gmail.com \
    --cc=raag.jadav@intel.com \
    --cc=sathyanarayanan.kuppuswamy@linux.intel.com \
    --cc=srinivasa.adatrao@intel.com \
    --cc=terry.bowman@amd.com \
    --cc=yurypm@arista.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 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.