Skip to content

Commit bcfa289

Browse files
ktbowmandavejiang
authored andcommitted
PCI: Replace cxl_error_is_native() with pcie_aer_is_native()
The AER driver includes a CXL support function cxl_error_is_native(). This function adds no additional value from pcie_aer_is_native(). Simplify the codebase by removing cxl_error_is_native() and replace occurrences of cxl_error_is_native() with pcie_aer_is_native(). Signed-off-by: Terry Bowman <terry.bowman@amd.com> Reviewed-by: Dan Williams <dan.j.williams@intel.com> Reviewed-by: Dave Jiang <dave.jiang@intel.com> Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com> Acked-by: Bjorn Helgaas <bhelgaas@google.com> Link: https://patch.msgid.link/20260114182055.46029-7-terry.bowman@amd.com Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Dave Jiang <dave.jiang@intel.com>
1 parent eb78ef4 commit bcfa289

1 file changed

Lines changed: 2 additions & 9 deletions

File tree

drivers/pci/pcie/aer.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,13 +1166,6 @@ static bool is_cxl_mem_dev(struct pci_dev *dev)
11661166
return true;
11671167
}
11681168

1169-
static bool cxl_error_is_native(struct pci_dev *dev)
1170-
{
1171-
struct pci_host_bridge *host = pci_find_host_bridge(dev->bus);
1172-
1173-
return (pcie_ports_native || host->native_aer);
1174-
}
1175-
11761169
static bool is_internal_error(struct aer_err_info *info)
11771170
{
11781171
if (info->severity == AER_CORRECTABLE)
@@ -1186,7 +1179,7 @@ static int cxl_rch_handle_error_iter(struct pci_dev *dev, void *data)
11861179
struct aer_err_info *info = (struct aer_err_info *)data;
11871180
const struct pci_error_handlers *err_handler;
11881181

1189-
if (!is_cxl_mem_dev(dev) || !cxl_error_is_native(dev))
1182+
if (!is_cxl_mem_dev(dev) || !pcie_aer_is_native(dev))
11901183
return 0;
11911184

11921185
/* Protect dev->driver */
@@ -1227,7 +1220,7 @@ static int handles_cxl_error_iter(struct pci_dev *dev, void *data)
12271220
bool *handles_cxl = data;
12281221

12291222
if (!*handles_cxl)
1230-
*handles_cxl = is_cxl_mem_dev(dev) && cxl_error_is_native(dev);
1223+
*handles_cxl = is_cxl_mem_dev(dev) && pcie_aer_is_native(dev);
12311224

12321225
/* Non-zero terminates iteration */
12331226
return *handles_cxl;

0 commit comments

Comments
 (0)