cxl: remove unnecessary calling of pci_enable_pcie_error_reporting()
authorDave Jiang <dave.jiang@intel.com>
Mon, 13 Feb 2023 20:28:42 +0000 (13:28 -0700)
committerDan Williams <dan.j.williams@intel.com>
Tue, 14 Feb 2023 22:05:30 +0000 (14:05 -0800)
With this [1] commit upstream, pci_enable_pci_error_report() is no longer
necessary for the driver to call. Remove call and related cleanups.

[1]: f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native")

Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/167632012093.4153151.5360778069735064322.stgit@djiang5-mobl3.local
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/cxl/pci.c

index 2bbebbc..cc8b5a7 100644 (file)
@@ -412,11 +412,6 @@ static bool is_cxl_restricted(struct pci_dev *pdev)
        return pci_pcie_type(pdev) == PCI_EXP_TYPE_RC_END;
 }
 
-static void disable_aer(void *pdev)
-{
-       pci_disable_pcie_error_reporting(pdev);
-}
-
 static int cxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 {
        struct cxl_register_map map;
@@ -494,12 +489,6 @@ static int cxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
        if (IS_ERR(cxlmd))
                return PTR_ERR(cxlmd);
 
-       if (cxlds->regs.ras) {
-               pci_enable_pcie_error_reporting(pdev);
-               rc = devm_add_action_or_reset(&pdev->dev, disable_aer, pdev);
-               if (rc)
-                       return rc;
-       }
        pci_save_state(pdev);
 
        return rc;