RE: [PATCH 01/12] notifier: add device-managed registration APIs

From: Farber, Eliav

Date: Sun Jul 26 2026 - 00:27:35 EST


> > +struct device;
> > struct notifier_block;
> >
> > typedef int (*notifier_fn_t)(struct notifier_block *nb,
> > @@ -145,10 +146,19 @@ extern void srcu_init_notifier_head(struct
> > srcu_notifier_head *nh);
> >
> > extern int atomic_notifier_chain_register(struct atomic_notifier_head *nh,
> > struct notifier_block *nb);
> > +extern int devm_atomic_notifier_chain_register(struct device *dev,
> > + struct atomic_notifier_head *nh,
> > + struct notifier_block *nb);
>
> Please don't use extern with function prototypes in new code.

Fixed in v2


> > +/**
> > + * devm_atomic_notifier_chain_register - Device-managed atomic notifier registration
> > + * @dev: Device to tie the notifier lifetime to
> > + * @nh: Pointer to head of the atomic notifier chain
> > + * @n: New entry in notifier chain
> > + *
> > + * Adds a notifier to an atomic notifier chain and registers a cleanup
> > + * action to automatically unregister it when @dev is unbound.
> > + *
> > + * Returns 0 on success, negative errno on error.
>
> Should be:
>
> Returns:
> 0 on success...

Fixed in v2

Thanks, Eliav