Re: [PATCH 00/12] notifier: add device-managed registration APIs and convert drivers

From: Bartosz Golaszewski

Date: Fri Jul 24 2026 - 03:46:37 EST


On Thu, 23 Jul 2026 19:53:13 +0200, Eliav Farber <farbere@xxxxxxxxxx> said:
> Many drivers repeat the same boilerplate when registering notifiers with
> device lifetime:
>
> 1. Register the notifier with *_notifier_chain_register()
> 2. Check for error
> 3. Register a devm action to unregister on teardown
> 4. Implement a per-driver static unregister callback
>
> This series adds devm_atomic_notifier_chain_register(),
> devm_blocking_notifier_chain_register(), and
> devm_raw_notifier_chain_register() that automatically unregister the
> notifier when the device is unbound, then converts 11 drivers to use
> them.
>
> Each conversion eliminates a per-driver unregister callback and the
> associated devm_add_action_or_reset() call, reducing code by ~15 lines
> per driver.
>
> The implementation follows the established devres pattern used by other
> device-managed kernel APIs.
>
> Checkpatch reports 6 CHECKs (0 errors, 0 warnings) on patch 1:
> - "extern prototypes should be avoided in .h files"
> - "Alignment should match open parenthesis"
>
> Both are intentional to match the existing coding style in notifier.h,
> where all declarations use 'extern' and tab-indented continuation lines.
>

What is the merging strategy? Acks and all patches go through driver core?

Bartosz