Re: [PATCH v3] PCI/portdrv: Allow AER service only for Root Ports & RCECs

From: Christoph Hellwig
Date: Mon Dec 12 2022 - 03:46:17 EST


On Fri, Dec 09, 2022 at 06:29:22PM -0600, Bjorn Helgaas wrote:
> + if ((pci_pcie_type(dev) == PCI_EXP_TYPE_ROOT_PORT ||
> + pci_pcie_type(dev) == PCI_EXP_TYPE_RC_EC) &&
> + dev->aer_cap && pci_aer_available() &&
> (pcie_ports_native || host->native_aer))

Eww, this is really hard to follow. Can you split this out into
a little helper, that actually documents the decisions based
on some of the wording you have in the current comit message?