From: sashiko-bot@kernel.org
To: "Mohamed Osama" <mohamed.osama189110@gmail.com>
Cc: gary@garyguo.net, linux-serial@vger.kernel.org, ojeda@kernel.org
Subject: Re: [PATCH 4/4] rust: sync: lock: use DropGuard
Date: Sun, 27 Sep 2026 10:51:52 +0000 [thread overview]
Message-ID: <20260927105152.8F08C1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260927104528.103881-5-mohamed.osama189110@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] rust: sync: horizontal import style used in touched import block
--
commit 67d0667c81a937f6d37a9c9023076060bd4316d7
Author: Mohamed Osama <mohamed.osama189110@gmail.com>
rust: sync: lock: use DropGuard
Replace the ScopeGuard usage in the Rust locking implementation with DropGuard.
The guard preserves the existing scope-exit cleanup behavior while using the
DropGuard API from the Rust kernel memory module.
> diff --git a/rust/kernel/sync/lock.rs b/rust/kernel/sync/lock.rs
> --- a/rust/kernel/sync/lock.rs
> +++ b/rust/kernel/sync/lock.rs
> @@ -7,8 +7,9 @@
>
> use super::LockClassKey;
> use crate::{
> + mem::DropGuard,
> str::{CStr, CStrExt as _},
> - types::{NotThreadSafe, Opaque, ScopeGuard},
> + types::{NotThreadSafe, Opaque},
[Severity: Low]
This isn't a bug, but since this patch modifies the import block here,
shouldn't it be updated to follow the kernel vertical import style?
The modified crate::types import leaves the items grouped horizontally
instead of formatting them vertically with one item per line.
> };
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260927104528.103881-1-mohamed.osama189110@gmail.com?part=4
next prev parent reply other threads:[~2026-09-27 10:51 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Dch07wH15t-1WtaVQW4vdfmtJuwC_4-JLvrWSB8Pk4vfEHO6mQk1FpYG-tCYBllTB3RbpOXpdyNZp84w4PFl1A==@protonmail.internalid>
2026-09-27 10:45 ` [PATCH v4 0/4] rust: introduce DropGuard Mohamed Osama
2026-09-27 10:45 ` [PATCH 1/4] rust: mem: add DropGuard Mohamed Osama
2026-09-27 10:52 ` sashiko-bot
2026-09-27 10:45 ` [PATCH 2/4] rust: block: gen_disk: use DropGuard Mohamed Osama
2026-09-27 10:51 ` sashiko-bot
2026-09-27 10:45 ` [PATCH 3/4] rust: serdev: " Mohamed Osama
2026-09-27 10:56 ` sashiko-bot
2026-09-27 10:45 ` [PATCH 4/4] rust: sync: lock: " Mohamed Osama
2026-09-27 10:51 ` sashiko-bot [this message]
2026-09-28 9:03 ` Boqun Feng
2026-09-28 9:48 ` [PATCH v4 0/4] rust: introduce DropGuard Andreas Hindborg
2026-09-28 9:50 ` Andreas Hindborg
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=20260927105152.8F08C1F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=gary@garyguo.net \
--cc=linux-serial@vger.kernel.org \
--cc=mohamed.osama189110@gmail.com \
--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