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

Uwe Kleine-König <[email protected]>
Newsgroups org.kernel.vger.linux-gpio,org.kernel.vger.linux-acpi,org.kernel.vger.linux-iio,org.kernel.vger.linux-input,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pwm,org.kernel.vger.platform-driver-x86
Message-ID <aoFcyiofUhsetEiq@monoceros>
Hello,

On Sun, Aug 16, 2026 at 05:39:47AM +0000, Farber, Eliav wrote:
> > 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.

Sounds like a good justification, thanks for considering my suggestion.

Uwe
signature.asc (application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE-----

iQEzBAABCgAdFiEEP4GsaTp6HlmJrf7Tj4D7WH0S/k4FAmqBXPEACgkQj4D7WH0S
/k5G9QgAiPl0SaJnsb71wiarjshHUxBTQ25ctRmpttPlhvHHEBw0CiKuC69HBhlW
x4a5BrRCQa6F8Tu9QxhAfS+3LfmK8Jxxfmk2cYWxruNUqH7u8elLQxzRTq/GlWX4
E8a1chJddKP7vbmFVM3YClG+ilryPCNVS2Xg/b+yIT+VgCRzdQjEgme3k6qagUOR
cIw6LAy1xDecauMYWU94PiXkO48m6a46dST1tmxjveaXMv4ZPJW8vCIg50XRQnMI
iuFeH4M8+m0g4eZy+4yAaSM7qcevqFFk0fJQFdlOrACDhqFthJIoxF7QFRWrIi4c
4goHTZRM+F+JcMu6mVFcA7UMd9GPOg==
=7fHf
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.