mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Almeida <daniel.almeida@collabora.com>
To: Andreas Hindborg <a.hindborg@kernel.org>
Cc: "Miguel Ojeda" <ojeda@kernel.org>,
	"Alex Gaynor" <alex.gaynor@gmail.com>,
	"Boqun Feng" <boqun.feng@gmail.com>,
	"Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <benno.lossin@proton.me>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Trevor Gross" <tmgross@umich.edu>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Ingo Molnar" <mingo@redhat.com>, "Will Deacon" <will@kernel.org>,
	"Waiman Long" <longman@redhat.com>,
	"Danilo Krummrich" <dakr@kernel.org>,
	"Joel Becker" <jlbec@evilplan.org>,
	"Christoph Hellwig" <hch@lst.de>, "Fiona Behrens" <me@kloenk.dev>,
	"Charalampos Mitrodimas" <charmitro@posteo.net>,
	rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 0/4] rust: configfs abstractions
Date: Fri, 21 Feb 2025 12:18:24 -0300	[thread overview]
Message-ID: <50E0963F-2CFA-462E-9767-626F0D18C77F@collabora.com> (raw)
In-Reply-To: <20250218-configfs-v3-0-0e40c0778187@kernel.org>

Hi Andreas,

> On 18 Feb 2025, at 09:57, Andreas Hindborg <a.hindborg@kernel.org> wrote:
> 
> This series adds a safe Rust API that allows Rust modules to interface
> the `configfs` machinery.
> 
> The series contains an example for the samples folder to demonstrate
> usage of the API. As such, there is no inline example in the
> documentation.
> 
> The last patch adds a maintainer entry for the Rust configfs
> abstractions, to make it absolutely clear that I will commit to maintain
> these abstractions, if required. Feel free to drop this patch if this is
> not required.
> 
> The series is a dependency of `rnull`, the Rust null block driver.
> Please see [1] for initial `configfs` support in `rnull`.
> 
> [1] https://github.com/metaspace/linux/tree/9ac53130f5fb05b9b3074fa261b445b8fde547dd/drivers/block/rnull
> 

I am trying to test this before reviewing, but I get this error:


```
error[E0308]: mismatched types
   --> linux/rust/kernel/miscdevice.rs:300:62
    |
300 |     let device = unsafe { <T::Ptr as ForeignOwnable>::borrow(private) };
    |                           ---------------------------------- ^^^^^^^ expected `*mut <... as ForeignOwnable>::PointedTo`, found `*mut c_void`
    |                           |
    |                           arguments to this function are incorrect
    |
    = note: expected raw pointer `*mut <<T as miscdevice::MiscDevice>::Ptr as types::ForeignOwnable>::PointedTo`
               found raw pointer `*mut ffi::c_void`
    = help: consider constraining the associated type `<<T as miscdevice::MiscDevice>::Ptr as types::ForeignOwnable>::PointedTo` to `ffi::c_void` or calling a method that returns `<<T as miscdevice::MiscDevice>::Ptr as types::ForeignOwnable>::PointedTo`
    = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
note: associated function defined here
   --> /home/dwls/dev/linux/rust/kernel/types.rs:98:15
    |
98  |     unsafe fn borrow<'a>(ptr: *mut Self::PointedTo) -> Self::Borrowed<'a>;
    |               ^^^^^^

error: aborting due to 1 previous error
```


— Daniel

  parent reply	other threads:[~2025-02-21 15:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-18 12:57 Andreas Hindborg
2025-02-18 12:57 ` [PATCH v3 1/4] rust: sync: change `<Arc<T> as ForeignOwnable>::PointedTo` to `T` Andreas Hindborg
2025-02-18 12:57 ` [PATCH v3 2/4] rust: configfs: introduce rust support for configfs Andreas Hindborg
2025-02-18 12:57 ` [PATCH v3 3/4] rust: configfs: add a sample demonstrating configfs usage Andreas Hindborg
2025-02-18 12:57 ` [PATCH v3 4/4] MAINTAINERS: add entry for configfs Rust abstractions Andreas Hindborg
2025-02-21 15:18 ` Daniel Almeida [this message]
2025-02-22  9:36   ` [PATCH v3 0/4] rust: configfs abstractions 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=50E0963F-2CFA-462E-9767-626F0D18C77F@collabora.com \
    --to=daniel.almeida@collabora.com \
    --cc=a.hindborg@kernel.org \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=benno.lossin@proton.me \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=charmitro@posteo.net \
    --cc=dakr@kernel.org \
    --cc=gary@garyguo.net \
    --cc=hch@lst.de \
    --cc=jlbec@evilplan.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=me@kloenk.dev \
    --cc=mingo@redhat.com \
    --cc=ojeda@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tmgross@umich.edu \
    --cc=will@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®