From: Rahul Rameshbabu <sergeantsagara@protonmail.com>
To: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Cc: rust-for-linux@vger.kernel.org, linux-input@vger.kernel.org,
Jiri Kosina <jikos@kernel.org>,
a.hindborg@kernel.org, alex.gaynor@gmail.com,
aliceryhl@google.com, benno.lossin@proton.me,
Benjamin Tissoires <benjamin.tissoires@redhat.com>,
bjorn3_gh@protonmail.com, boqun.feng@gmail.com, dakr@kernel.org,
db48x@db48x.net, gary@garyguo.net, ojeda@kernel.org,
tmgross@umich.edu, peter.hutterer@who-t.net
Subject: Re: [PATCH v2 3/4] rust: core abstractions for HID drivers
Date: Sun, 20 Jul 2025 16:44:26 +0000 [thread overview]
Message-ID: <87o6testga.fsf@protonmail.com> (raw)
In-Reply-To: <CANiq72m1itFYJgtyG02qnW1qyZU9UEo6OSLfzkXGesXNggxyBA@mail.gmail.com>
On Sun, 13 Jul, 2025 23:57:38 +0200 "Miguel Ojeda" <miguel.ojeda.sandonis@gmail.com> wrote:
>> + /// Returns the HID report group.
>> + pub fn group(&self) -> u16 {
>> + // SAFETY: `self.as_raw` is a valid pointer to a `struct hid_device`
>> + unsafe { *self.as_raw() }.group
>> + }
>
> Do you need to expose the group as a raw integer?
>
> Also, are these used currently?
Hi Miguel,
I originally did not expose the report group in the Rust bindings since
I did not make use of them. Benjamin has a preference access to them be
exposed in the initial bindings. I exposed this before implementing the
enum in a later revision. I agree that we should wrap this using the
enum now.
Thanks,
Rahul Rameshbabu
next prev parent reply other threads:[~2025-07-20 16:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-13 21:11 [PATCH v2 0/4] Initial work for Rust abstraction for HID device driver development Rahul Rameshbabu
2025-07-13 21:11 ` [PATCH v2 1/4] HID: core: Change hid_driver to use a const char* for name Rahul Rameshbabu
2025-07-13 21:12 ` [PATCH v2 2/4] rust: add kref bindings Rahul Rameshbabu
2025-07-20 16:02 ` Rahul Rameshbabu
2025-07-20 16:07 ` Boqun Feng
2025-07-13 21:12 ` [PATCH v2 3/4] rust: core abstractions for HID drivers Rahul Rameshbabu
2025-07-13 21:57 ` Miguel Ojeda
2025-07-20 16:44 ` Rahul Rameshbabu [this message]
2025-07-15 15:04 ` Danilo Krummrich
2025-07-19 22:46 ` Rahul Rameshbabu
2025-07-13 21:12 ` [PATCH v2 4/4] rust: hid: Glorious Gaming PC Race Model O and O- mice reference driver Rahul Rameshbabu
2025-07-13 21:46 ` Miguel Ojeda
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=87o6testga.fsf@protonmail.com \
--to=sergeantsagara@protonmail.com \
--cc=a.hindborg@kernel.org \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=benjamin.tissoires@redhat.com \
--cc=benno.lossin@proton.me \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=dakr@kernel.org \
--cc=db48x@db48x.net \
--cc=gary@garyguo.net \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=miguel.ojeda.sandonis@gmail.com \
--cc=ojeda@kernel.org \
--cc=peter.hutterer@who-t.net \
--cc=rust-for-linux@vger.kernel.org \
--cc=tmgross@umich.edu \
/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;
as well as URLs for NNTP newsgroup(s).