]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
cxl/pci: Remove unnecessary CXL RCH handling helper functions
authorTerry Bowman <terry.bowman@amd.com>
Wed, 14 Jan 2026 18:20:26 +0000 (12:20 -0600)
committerDave Jiang <dave.jiang@intel.com>
Thu, 22 Jan 2026 21:57:10 +0000 (14:57 -0700)
cxl_handle_rdport_cor_ras() and cxl_handle_rdport_ras() are specific
to Restricted CXL Host (RCH) handling. Improve readability and
maintainability by replacing these and instead using the common
cxl_handle_cor_ras() and cxl_handle_ras() functions.

Signed-off-by: Terry Bowman <terry.bowman@amd.com>
Reviewed-by: Alejandro Lucero <alucerop@amd.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Link: https://patch.msgid.link/20260114182055.46029-6-terry.bowman@amd.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
drivers/cxl/core/pci.c

index 3ec7407f0c5dad5123e13499d04f804a99d4a84d..51bb0f372e40dd9c2430d753e63aeabb0e23926d 100644 (file)
@@ -779,18 +779,6 @@ void cxl_dport_init_ras_reporting(struct cxl_dport *dport, struct device *host)
 }
 EXPORT_SYMBOL_NS_GPL(cxl_dport_init_ras_reporting, "CXL");
 
-static void cxl_handle_rdport_cor_ras(struct cxl_dev_state *cxlds,
-                                         struct cxl_dport *dport)
-{
-       return cxl_handle_cor_ras(cxlds, dport->regs.ras);
-}
-
-static bool cxl_handle_rdport_ras(struct cxl_dev_state *cxlds,
-                                      struct cxl_dport *dport)
-{
-       return cxl_handle_ras(cxlds, dport->regs.ras);
-}
-
 /*
  * Copy the AER capability registers using 32 bit read accesses.
  * This is necessary because RCRB AER capability is MMIO mapped. Clear the
@@ -860,9 +848,9 @@ static void cxl_handle_rdport_errors(struct cxl_dev_state *cxlds)
        pci_print_aer(pdev, severity, &aer_regs);
 
        if (severity == AER_CORRECTABLE)
-               cxl_handle_rdport_cor_ras(cxlds, dport);
+               cxl_handle_cor_ras(cxlds, dport->regs.ras);
        else
-               cxl_handle_rdport_ras(cxlds, dport);
+               cxl_handle_ras(cxlds, dport->regs.ras);
 }
 
 #else