[PATCH v3 4/7] acpi/ghes, cxl: Rename cxl_cper_register_work to cxl_cper_register_event_work

Smita Koralahalli
2024-11-19T00:39:31Z

Rename cxl_cper_register_work() to cxl_cper_register_event_work() to
better reflect its purpose of registering CXL Component Events based work
within the CXL subsystem.

This rename prepares the codebase to support future patches where
cxl_cper_register_work() will accept generic pointers for Protocol Error
workqueue integration.

Signed-off-by: Smita Koralahalli <Smita.KoralahalliChannabasappa@amd.com>
---
drivers/acpi/apei/ghes.c | 8 ++++----
drivers/cxl/pci.c | 4 ++--
include/cxl/event.h | 8 ++++----
3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
index ada93cfde9ba..082c409707ba 100644
--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -717,7 +717,7 @@ static void cxl_cper_post_event(enum cxl_event_type event_type,
schedule_work(cxl_cper_work);
}

-int cxl_cper_register_work(struct work_struct *work)
+int cxl_cper_register_event_work(struct work_struct *work)
{
if (cxl_cper_work)
return -EINVAL;
@@ -726,9 +726,9 @@ int cxl_cper_register_work(struct work_struct *work)
cxl_cper_work = work;
return 0;
}
-EXPORT_SYMBOL_NS_GPL(cxl_cper_register_work, CXL);
+EXPORT_SYMBOL_NS_GPL(cxl_cper_register_event_work, CXL);

-int cxl_cper_unregister_work(struct work_struct *work)
+int cxl_cper_unregister_event_work(struct work_struct *work)
{
if (cxl_cper_work != work)
return -EINVAL;
@@ -737,7 +737,7 @@ int cxl_cper_unregister_work(struct work_struct *work)
cxl_cper_work = NULL;
return 0;
}
-EXPORT_SYMBOL_NS_GPL(cxl_cper_unregister_work, CXL);
+EXPORT_SYMBOL_NS_GPL(cxl_cper_unregister_event_work, CXL);

int cxl_cper_kfifo_get(struct cxl_cper_work_data *wd)
{
diff --git a/drivers/cxl/pci.c b/drivers/cxl/pci.c
index 188412d45e0d..88a14d7baa65 100644
--- a/drivers/cxl/pci.c
+++ b/drivers/cxl/pci.c
@@ -1075,7 +1075,7 @@ static int __init cxl_pci_driver_init(void)
if (rc)
return rc;

- rc = cxl_cper_register_work(&cxl_cper_work);
+ rc = cxl_cper_register_event_work(&cxl_cper_work);
if (rc)
pci_unregister_driver(&cxl_pci_driver);

@@ -1084,7 +1084,7 @@ static int __init cxl_pci_driver_init(void)

static void __exit cxl_pci_driver_exit(void)
{
- cxl_cper_unregister_work(&cxl_cper_work);
+ cxl_cper_unregister_event_work(&cxl_cper_work);
cancel_work_sync(&cxl_cper_work);
pci_unregister_driver(&cxl_pci_driver);
}
diff --git a/include/cxl/event.h b/include/cxl/event.h
index 66d85fc87701..992568b35455 100644
--- a/include/cxl/event.h
+++ b/include/cxl/event.h
@@ -233,16 +233,16 @@ struct cxl_ras_capability_regs {
};

#ifdef CONFIG_ACPI_APEI_GHES
-int cxl_cper_register_work(struct work_struct *work);
-int cxl_cper_unregister_work(struct work_struct *work);
+int cxl_cper_register_event_work(struct work_struct *work);
+int cxl_cper_unregister_event_work(struct work_struct *work);
int cxl_cper_kfifo_get(struct cxl_cper_work_data *wd);
#else
-static inline int cxl_cper_register_work(struct work_struct *work)
+static inline int cxl_cper_register_event_work(struct work_struct *work)
{
return 0;
}

-static inline int cxl_cper_unregister_work(struct work_struct *work)
+static inline int cxl_cper_unregister_event_work(struct work_struct *work)
{
return 0;
}
--
2.17.1