From: sashiko-bot@kernel.org
To: "Artem Lytkin" <iprintercanon@gmail.com>
Cc: linux-watchdog@vger.kernel.org, ojeda@kernel.org
Subject: Re: [PATCH v2 2/3] rust: reboot: add emergency_restart() wrapper
Date: Thu, 23 Jul 2026 16:19:20 +0000 [thread overview]
Message-ID: <20260723161925.24CF51F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260723161529.23759-3-iprintercanon@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Missing `#[inline]` annotation on the `emergency_restart` abstraction function.
--
--- Patch [2]: [PATCH v2 2/3] rust: reboot: add emergency_restart() wrapper ---
commit 13ef5d00452d4b8320913eb2ed361d92083a6263
Author: Artem Lytkin <iprintercanon@gmail.com>
rust: reboot: add emergency_restart() wrapper
This commit adds a minimal reboot module wrapping the emergency_restart
function. This allows Rust watchdog drivers to restart the machine
immediately without syncing or unmounting filesystems.
> diff --git a/rust/kernel/reboot.rs b/rust/kernel/reboot.rs
> new file mode 100644
> index 0000000000000..f98a85d19f85d
> --- /dev/null
> +++ b/rust/kernel/reboot.rs
[ ... ]
> +/// This is intended for situations where the system is in a state where an
> +/// orderly shutdown is no longer possible, for example when a watchdog
> +/// expires. It can be called from any context, including interrupt context.
> +pub fn emergency_restart() {
[Severity: Low]
This isn't a bug, but since this function is small and forwards directly to a
C binding, should it be annotated with #[inline] to match the Rust subsystem
guidelines for abstractions?
> + // SAFETY: `emergency_restart` has no preconditions and is documented as
> + // safe to call from any context.
> + unsafe { bindings::emergency_restart() }
> +}
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260723161529.23759-1-iprintercanon@gmail.com?part=2
next prev parent reply other threads:[~2026-07-23 16:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-23 16:15 [PATCH v2 0/3] rust: add watchdog abstraction and Rust softdog driver Artem Lytkin
2026-07-23 16:15 ` [PATCH v2 1/3] rust: watchdog: add watchdog device abstraction Artem Lytkin
2026-07-23 16:30 ` sashiko-bot
2026-07-23 16:15 ` [PATCH v2 2/3] rust: reboot: add emergency_restart() wrapper Artem Lytkin
2026-07-23 16:19 ` sashiko-bot [this message]
2026-07-23 16:15 ` [PATCH v2 3/3] watchdog: softdog_rs: add Rust software watchdog driver Artem Lytkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260723161925.24CF51F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=iprintercanon@gmail.com \
--cc=linux-watchdog@vger.kernel.org \
--cc=ojeda@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox