Re: [PATCH 08/12] ACPI: APEI: GHES: use devm_blocking_notifier_chain_register()

From: Jonathan Cameron

Date: Thu Jul 23 2026 - 20:51:00 EST


On Thu, 23 Jul 2026 17:55:09 +0000
Eliav Farber <farbere@xxxxxxxxxx> wrote:

> Replace the blocking_notifier_chain_register() +
> devm_add_action_or_reset() pattern with a single call to
> devm_blocking_notifier_chain_register(), removing the
> ghes_vendor_record_notifier_destroy() callback.
>
> Signed-off-by: Eliav Farber <farbere@xxxxxxxxxx>
> ---
> drivers/acpi/apei/ghes.c | 15 +++------------
> 1 file changed, 3 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
> index 3236a3ce79d6..3aa29dcd70da 100644
> --- a/drivers/acpi/apei/ghes.c
> +++ b/drivers/acpi/apei/ghes.c
> @@ -689,21 +689,12 @@ void ghes_unregister_vendor_record_noti fier(struct notifier_block *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);
> - if (ret)
> - return ret;
> -
> - return devm_add_action_or_reset(dev, ghes_vendor_record_notifier_destroy, nb);
> + return devm_blocking_notifier_chain_register(dev,
> + &vendor_record_notify_list,
> + nb);

Whilst correct, I'm less keen on this one because it looses the obvious connection
to the non devm form. I suppose with the code being so near
to the non devm we can go with this.

For that matter why do we have the non devm variants? There are no users in tree.
Can we just rip that and the unregister given this is removing the only users?

Thanks,

Jonathan


> }
> EXPORT_SYMBOL_GPL(devm_ghes_register_vendor_record_notifier);
>