All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boqun Feng <boqun.feng@gmail.com>
To: Daniel Almeida <daniel.almeida@collabora.com>
Cc: "Alice Ryhl" <aliceryhl@google.com>,
	"Miguel Ojeda" <ojeda@kernel.org>,
	"Alex Gaynor" <alex.gaynor@gmail.com>,
	"Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <benno.lossin@proton.me>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Trevor Gross" <tmgross@umich.edu>,
	linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org
Subject: Re: [PATCH] rust: irq: add support for request_irq()
Date: Tue, 14 Jan 2025 16:45:47 -0800	[thread overview]
Message-ID: <Z4cFO5NIW-E07Vl5@boqun-archlinux> (raw)
In-Reply-To: <20499935-B328-4DE3-AFBF-B692FA3434E5@collabora.com>

On Tue, Jan 14, 2025 at 03:57:57PM -0300, Daniel Almeida wrote:
> 
> > 
> > It's not the pin_init! stuff, but the Opaque stuff. If it fails, then
> > it runs the destructor of Opaque<T>, which does *not* run the
> > destructor of T.
> > 
> > Alice
> 
> This is pretty unintuitive if you take into account trivial examples like
> 
> ```
> struct Foo(T)
> ```
> 
> Where dropping Foo drops T.
> 
> Is there any reason why dropping Opaque<T> doesn’t behave similarly?
> 

Because `Opaque` implies the value may not be initialized, it's similar
to `MaybeUninit`.

Do you really need the `Opaque` here? C code won't touch `handler` if
I'm not missing anything.

Regards,
Boqun

> — Daniel

  reply	other threads:[~2025-01-15  0:47 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-24 14:20 [PATCH] rust: irq: add support for request_irq() Daniel Almeida
2024-10-24 15:05 ` Miguel Ojeda
2024-10-24 15:08   ` Daniel Almeida
2024-10-27  5:30 ` kernel test robot
2024-10-28 15:29 ` Alice Ryhl
2024-11-04 20:10   ` Daniel Almeida
2024-11-06 11:17     ` Alice Ryhl
2024-10-29 11:59 ` Alice Ryhl
2024-11-04 19:19   ` Daniel Almeida
2025-01-13 14:42 ` Alice Ryhl
2025-01-14 18:34   ` Daniel Almeida
2025-01-14 18:36     ` Alice Ryhl
2025-01-14 18:57       ` Daniel Almeida
2025-01-15  0:45         ` Boqun Feng [this message]
2025-01-15  8:27           ` Alice Ryhl
2025-01-15 14:39             ` Boqun Feng
2025-01-15 14:42               ` Alice Ryhl
2025-01-15 16:00                 ` Boqun Feng
2025-01-15 15:37               ` Daniel Almeida
2025-01-15 11:38         ` Gary Guo
2025-01-15 12:31           ` Daniel Almeida
2025-01-16  8:29             ` Alice Ryhl
2025-01-19 17:50               ` Boqun Feng
2025-01-15 11:42 ` Gary Guo

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=Z4cFO5NIW-E07Vl5@boqun-archlinux \
    --to=boqun.feng@gmail.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=daniel.almeida@collabora.com \
    --cc=gary@garyguo.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ojeda@kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.