Linux Input/HID development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: clicedvly768 <harepro29@gmail.com>
Cc: linux-input@vger.kernel.org, dmitry.torokhov@gmail.com,
	ojeda@kernel.org, gary@garyguo.net
Subject: Re: [PATCH v3 1/2] rust: input: add input device abstractions
Date: Fri, 06 Nov 2026 21:20:14 +0000	[thread overview]
Message-ID: <sashiko-outbox-202295@kernel.org> (raw)
In-Reply-To: <20261106211034.401918-2-harepro29@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] rust: input: non-vertical crate import formatting in input.rs
--

commit d03870e71b5fd937f97b178433700c90c89f7646
Author: clicedvly768 <harepro29@gmail.com>

rust: input: add input device abstractions

This commit adds safe Rust abstractions for Linux input devices,
including AllocatedDevice for pre-registration configuration and
RegisteredDevice for event reporting and cleanup.

> diff --git a/rust/kernel/input.rs b/rust/kernel/input.rs
> new file mode 100644
> index 0000000000000..707f2af3110d6
> --- /dev/null
> +++ b/rust/kernel/input.rs
> @@ -0,0 +1,248 @@
> +// SPDX-License-Identifier: GPL-2.0
> +
> +//! Input subsystem abstractions for safe Rust drivers.
> +//!
> +//! Provides a safe Rust object-oriented interface around Linux `struct input_dev`,
> +//! ensuring safe allocation, capability configuration, registration, and RAII cleanup.
> +
> +use crate::{bindings, device, error::to_result, prelude::*};

[Severity: Low]
This isn't a bug, but multi-item crate imports in kernel Rust code should
use the vertical layout with a trailing empty comment (//) per
Documentation/rust/coding-guidelines.rst so rustfmt keeps each imported
item on its own line.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261106211034.401918-1-harepro29@gmail.com?part=1

  reply	other threads:[~2026-11-06 21:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-06 21:10 [PATCH v3 0/2] rust: input: add input/serio abstractions and port Gravis Stinger driver clicedvly768
2026-11-06 21:10 ` [PATCH v3 1/2] rust: input: add input device abstractions clicedvly768
2026-11-06 21:20   ` sashiko-bot [this message]
2026-11-06 21:10 ` [PATCH v3 2/2] rust: serio: add serio bus abstractions and port Gravis Stinger driver clicedvly768
2026-11-06 21:28   ` sashiko-bot

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=sashiko-outbox-202295@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=gary@garyguo.net \
    --cc=harepro29@gmail.com \
    --cc=linux-input@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