From: Zhao Liu <zhao1.liu@intel.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-rust@nongnu.org
Subject: Re: [PATCH] rust: qom: remove operations on &mut
Date: Wed, 5 Mar 2025 01:07:04 +0800 [thread overview]
Message-ID: <Z8czOELqP69Yk/qG@intel.com> (raw)
In-Reply-To: <20250228085831.847265-1-pbonzini@redhat.com>
On Fri, Feb 28, 2025 at 09:58:31AM +0100, Paolo Bonzini wrote:
> Date: Fri, 28 Feb 2025 09:58:31 +0100
> From: Paolo Bonzini <pbonzini@redhat.com>
> Subject: [PATCH] rust: qom: remove operations on &mut
> X-Mailer: git-send-email 2.48.1
>
> The dubious casts of mutable references to objects are not used
> anymore: the wrappers for qdev_init_clock_in and for IRQ and MMIO
> initialization can be called directly on the subclasses, without
> casts, plus they take a shared reference so they can just use
> "upcast()" instead of "upcast_mut()". Remove them.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> rust/qemu-api/src/prelude.rs | 1 -
> rust/qemu-api/src/qom.rs | 83 ------------------------------------
> rust/qemu-api/tests/tests.rs | 34 +--------------
> 3 files changed, 2 insertions(+), 116 deletions(-)
Simplification is always a good thing,
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
prev parent reply other threads:[~2025-03-04 16:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-28 8:58 [PATCH] rust: qom: remove operations on &mut Paolo Bonzini
2025-03-04 17:07 ` Zhao Liu [this message]
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=Z8czOELqP69Yk/qG@intel.com \
--to=zhao1.liu@intel.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-rust@nongnu.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;
as well as URLs for NNTP newsgroup(s).