mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Muchamad Coirul Anwar <muchamadcoirulanwar@gmail.com>
To: Igor Korotin <igor.korotin@linux.dev>
Cc: Jonathan Cameron <jic23@kernel.org>,
	Miguel Ojeda <ojeda@kernel.org>,
	 Danilo Krummrich <dakr@kernel.org>,
	David Lechner <dlechner@baylibre.com>,
	 Alice Ryhl <aliceryhl@google.com>,
	Daniel Almeida <daniel.almeida@collabora.com>,
	 Mark Brown <broonie@kernel.org>,
	Andi Shyti <andi.shyti@kernel.org>, Shuai Liu <847807867@qq.com>,
	 linux-iio@vger.kernel.org, linux-i2c@vger.kernel.org,
	 rust-for-linux@vger.kernel.org, driver-core@lists.linux.dev,
	 linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH v7 3/4] rust: add minimal IIO subsystem abstractions
Date: Wed, 25 Nov 2026 09:24:50 +0700	[thread overview]
Message-ID: <CAO26r3Tn95hm8SCEcP13wXE7p+iQpJ0O2n_tyhQvYUTkG813cA@mail.gmail.com> (raw)
In-Reply-To: <179538281024.9825.4132712997497273037@linux.dev>

On Mon, 23 Nov 2026 at 04:26, Igor Korotin <igor.korotin@linux.dev> wrote:
>
> Clippy shows two issues in iio.rs:
>
> 1. Line 332 -- ..unsafe { zeroed() } in VTABLE. The SAFETY reasoning is
>    already written above the const, but clippy's undocumented_unsafe_blocks
>    wants its own comment immediately above that specific line.
>
> 2. Line 408 -- unsafe { (&*priv_ptr).channels() }, drop the &:
>    unsafe { (*priv_ptr).channels() }. needless_borrow, no semantic change.

Hi Igor,

Thanks for the review.

I plan to use `pin_init::zeroed()` instead, since `iio_info` implements
`Zeroable`. That removes the need for the unsafe block.
I also removed the explicit borrow, as you suggested.

Cheers,
Coirul

> Cheers
> Igor

  reply	other threads:[~2026-11-25  2:25 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-09 15:57 [RFC PATCH v7 0/4] iio: position: add Rust driver for ams AS5600 Muchamad Coirul Anwar
2026-11-09 15:57 ` [RFC PATCH v7 1/4] rust: io: add FallibleIoCapable Muchamad Coirul Anwar
2026-11-09 15:57 ` [RFC PATCH v7 2/4] i2c: rust: implement SMBus access via IoBackend Muchamad Coirul Anwar
2026-11-22 13:34   ` Markus Probst
2026-11-25  2:32     ` Muchamad Coirul Anwar
2026-11-22 21:22   ` Igor Korotin
2026-11-09 15:57 ` [RFC PATCH v7 3/4] rust: add minimal IIO subsystem abstractions Muchamad Coirul Anwar
2026-11-22 21:26   ` Igor Korotin
2026-11-25  2:24     ` Muchamad Coirul Anwar [this message]
2026-11-09 15:57 ` [RFC PATCH v7 4/4] iio: position: add Rust driver for ams AS5600 Muchamad Coirul Anwar
2026-11-28 23:58 ` [RFC PATCH v7 0/4] " Jonathan Cameron
2026-11-29 15:40   ` Muchamad Coirul Anwar
2026-11-30 11:42 ` Joshua Crofts

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=CAO26r3Tn95hm8SCEcP13wXE7p+iQpJ0O2n_tyhQvYUTkG813cA@mail.gmail.com \
    --to=muchamadcoirulanwar@gmail.com \
    --cc=847807867@qq.com \
    --cc=aliceryhl@google.com \
    --cc=andi.shyti@kernel.org \
    --cc=broonie@kernel.org \
    --cc=dakr@kernel.org \
    --cc=daniel.almeida@collabora.com \
    --cc=dlechner@baylibre.com \
    --cc=driver-core@lists.linux.dev \
    --cc=igor.korotin@linux.dev \
    --cc=jic23@kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®