RE: [PATCH v4 10/13] platform/x86: uniwill-wmi: use devm_blocking_notifier_chain_register()

From: Farber, Eliav

Date: Sun Aug 16 2026 - 01:40:37 EST


> On Sun, Jul 26, 2026 at 10:17:36AM +0000, Eliav Farber wrote:
> > int devm_uniwill_wmi_register_notifier(struct device *dev, struct
> > notifier_block *nb) {
> > - int ret;
> > -
> > - ret = blocking_notifier_chain_register(&uniwill_wmi_chain_head, nb);
> > - if (ret < 0)
> > - return ret;
> > -
> > - return devm_add_action_or_reset(dev, devm_uniwill_wmi_unregister_notifier, nb);
> > + return devm_blocking_notifier_chain_register(dev,
> > + &uniwill_wmi_chain_head,
> > + nb);
> > }
>
> I'd remove this function and replace calls to it directly by devm_blocking_notifier_chain_register().

uniwill_wmi_chain_head is static in uniwill-wmi.c and the caller is in
uniwill-acpi.c. The wrapper encapsulates access to this module-private
notifier head - removing it would require exposing the variable through
the header, which breaks the current abstraction.

I'd prefer to keep the wrapper as-is.

Best regards
Eliav