[PATCH v6 3/7] ACPI: APEI: GHES: remove unused ghes_{,un}register_vendor_record_notifier()

From: Eliav Farber

Date: Fri Nov 13 2026 - 06:54:27 EST


Remove ghes_register_vendor_record_notifier() and
ghes_unregister_vendor_record_notifier() along with their
EXPORT_SYMBOL_GPL()s and ghes.h declarations, since there are no
remaining in-tree callers - all users go through
devm_ghes_register_vendor_record_notifier() instead.

Inline the register/unregister calls directly into
devm_ghes_register_vendor_record_notifier() and its destroy callback.

Signed-off-by: Eliav Farber <farbere@xxxxxxxxxx>
Reviewed-by: Jonathan Cameron <jonathan.cameron@xxxxxxxxxxxxxxxx>
---
Changes in v6:
- Rebased onto v7.4-rc1.
- Replaced an em dash in the commit message with an ASCII hyphen. No
change to the code.
- Jonathan Cameron's Reviewed-by retained; the code is unchanged since
v4, when it was given.

Changes in v4:
- Split from the devm conversion patch into its own commit
(Andy Shevchenko)

Changes in v2:
- New patch: remove unused ghes_register_vendor_record_notifier() and
ghes_unregister_vendor_record_notifier() along with their
EXPORT_SYMBOL_GPL()s and ghes.h declarations, since there are no
in-tree callers (Jonathan Cameron)

drivers/acpi/apei/ghes.c | 16 +++-------------
include/acpi/ghes.h | 16 ----------------
2 files changed, 3 insertions(+), 29 deletions(-)

diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
index 663dc2e601cf..a81ffacb16d0 100644
--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -679,29 +679,19 @@ static void ghes_handle_aer(struct acpi_hest_generic_data *gdata)

static BLOCKING_NOTIFIER_HEAD(vendor_record_notify_list);

-int ghes_register_vendor_record_notifier(struct notifier_block *nb)
+static void ghes_vendor_record_notifier_destroy(void *data)
{
- return blocking_notifier_chain_register(&vendor_record_notify_list, nb);
-}
-EXPORT_SYMBOL_GPL(ghes_register_vendor_record_notifier);
+ struct notifier_block *nb = data;

-void ghes_unregister_vendor_record_notifier(struct notifier_block *nb)
-{
blocking_notifier_chain_unregister(&vendor_record_notify_list, nb);
}
-EXPORT_SYMBOL_GPL(ghes_unregister_vendor_record_notifier);
-
-static void ghes_vendor_record_notifier_destroy(void *nb)
-{
- ghes_unregister_vendor_record_notifier(nb);
-}

int devm_ghes_register_vendor_record_notifier(struct device *dev,
struct notifier_block *nb)
{
int ret;

- ret = ghes_register_vendor_record_notifier(nb);
+ ret = blocking_notifier_chain_register(&vendor_record_notify_list, nb);
if (ret)
return ret;

diff --git a/include/acpi/ghes.h b/include/acpi/ghes.h
index 7acf209061ea..b01b3f6d0868 100644
--- a/include/acpi/ghes.h
+++ b/include/acpi/ghes.h
@@ -55,22 +55,6 @@ enum {
};

#ifdef CONFIG_ACPI_APEI_GHES
-/**
- * ghes_register_vendor_record_notifier - register a notifier for vendor
- * records that the kernel would otherwise ignore.
- * @nb: pointer to the notifier_block structure of the event handler.
- *
- * return 0 : SUCCESS, non-zero : FAIL
- */
-int ghes_register_vendor_record_notifier(struct notifier_block *nb);
-
-/**
- * ghes_unregister_vendor_record_notifier - unregister the previously
- * registered vendor record notifier.
- * @nb: pointer to the notifier_block structure of the vendor record handler.
- */
-void ghes_unregister_vendor_record_notifier(struct notifier_block *nb);
-
/**
* devm_ghes_register_vendor_record_notifier - device-managed vendor
* record notifier registration.
--
2.47.3