Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Terry Bowman and committed by
Dave Jiang
bcfa2899 eb78ef4d

+2 -9
+2 -9
drivers/pci/pcie/aer.c
··· 1166 1166 return true; 1167 1167 } 1168 1168 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 - 1176 1169 static bool is_internal_error(struct aer_err_info *info) 1177 1170 { 1178 1171 if (info->severity == AER_CORRECTABLE) ··· 1179 1186 struct aer_err_info *info = (struct aer_err_info *)data; 1180 1187 const struct pci_error_handlers *err_handler; 1181 1188 1182 - if (!is_cxl_mem_dev(dev) || !cxl_error_is_native(dev)) 1189 + if (!is_cxl_mem_dev(dev) || !pcie_aer_is_native(dev)) 1183 1190 return 0; 1184 1191 1185 1192 /* Protect dev->driver */ ··· 1220 1227 bool *handles_cxl = data; 1221 1228 1222 1229 if (!*handles_cxl) 1223 - *handles_cxl = is_cxl_mem_dev(dev) && cxl_error_is_native(dev); 1230 + *handles_cxl = is_cxl_mem_dev(dev) && pcie_aer_is_native(dev); 1224 1231 1225 1232 /* Non-zero terminates iteration */ 1226 1233 return *handles_cxl;