Thread (15 messages) 15 messages, 2 authors, 2026-07-26

Re: [PATCH v2 12/12] reboot: use devm_blocking_notifier_chain_register()

flat view

From: sashiko-bot@kernel.org
Date: 2026-07-26 05:07:00

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The commit message incorrectly claims to replace the `blocking_notifier_chain_register() + devm_add_action_or_reset()` pattern, which was not used in the original code.
--
--- Patch [12]: [PATCH v2 12/12] reboot: use devm_blocking_notifier_chain_register() ---
commit 8cd90dfccbe30e1a7f1ea6421b385708237370fb
Author: Eliav Farber [off-list ref]

reboot: use devm_blocking_notifier_chain_register()

This commit replaces the manual devres allocation and registration pattern
in devm_register_reboot_notifier() with a direct call to
devm_blocking_notifier_chain_register(). It also drops the now unused
devm_unregister_reboot_notifier() callback.
Replace the blocking_notifier_chain_register() +
devm_add_action_or_reset() pattern with a single call to
devm_blocking_notifier_chain_register(), removing the
devm_unregister_reboot_notifier() callback.
[Severity: Medium]
This isn't a bug, but does the commit message accurately describe the old
code? 

Looking at the original implementation of devm_register_reboot_notifier()
in kernel/reboot.c, it didn't use devm_add_action_or_reset(), but rather
manually allocated the devres struct:

    rcnb = devres_alloc(devm_unregister_reboot_notifier,
                        sizeof(*rcnb), GFP_KERNEL);
    if (!rcnb)
        return -ENOMEM;

    ret = register_reboot_notifier(nb);

Could the commit message be updated to accurately reflect the pattern that
was actually removed from the code?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260726045706.8169-1-farbere@amazon.com?part=12
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help