From: Eric Blake <eblake@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>, patches@linaro.org
Subject: Re: [Qemu-devel] [PATCH] nbd: Don't use *_to_cpup() functions
Date: Fri, 10 Jun 2016 09:04:37 -0600 [thread overview]
Message-ID: <575AD705.2010901@redhat.com> (raw)
In-Reply-To: <1465570836-22211-1-git-send-email-peter.maydell@linaro.org>
[-- Attachment #1: Type: text/plain, Size: 889 bytes --]
On 06/10/2016 09:00 AM, Peter Maydell wrote:
> The *_to_cpup() functions are not very useful, as they simply do
> a pointer dereference and then a *_to_cpu(). Instead use either:
> * ld*_*_p(), if the data is at an address that might not be
> correctly aligned for the load
> * a local dereference and *_to_cpu(), if the pointer is
> the correct type and known to be correctly aligned
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> The motivation is to be able to drop *_to_cpup() entirely;
> we don't have many places that use it.
> ---
> nbd/client.c | 8 ++++----
> nbd/server.c | 10 +++++-----
> qemu-nbd.c | 4 ++--
> 3 files changed, 11 insertions(+), 11 deletions(-)
>
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2016-06-10 15:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-10 15:00 [Qemu-devel] [PATCH] nbd: Don't use *_to_cpup() functions Peter Maydell
2016-06-10 15:04 ` Eric Blake [this message]
2016-06-13 9:34 ` Paolo Bonzini
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=575AD705.2010901@redhat.com \
--to=eblake@redhat.com \
--cc=patches@linaro.org \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@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).