qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Eric Blake <eblake@redhat.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>,
	Amit Shah <amit.shah@redhat.com>,
	Juan Quintela <quintela@redhat.com>,
	Patch Tracking <patches@linaro.org>
Subject: Re: [Qemu-devel] [PATCH] migration: Don't use *_to_cpup()
Date: Fri, 10 Jun 2016 17:02:19 +0100	[thread overview]
Message-ID: <CAFEAcA82VzKsQFpXfCFvnaA-fC3C8D6TWQ-DDHjMtcqwfjP4BA@mail.gmail.com> (raw)
In-Reply-To: <575AD753.2000609@redhat.com>

On 10 June 2016 at 16:05, Eric Blake <eblake@redhat.com> wrote:
> On 06/10/2016 09:01 AM, Peter Maydell wrote:
>> The *_to_cpup() functions just compose a pointer dereference with
>> a *_to_cpu() byteswap. Instead use ld*_p(), which handles potential
>> pointer misaligment and avoids the need to cast the pointer.
>
> s/misaligment/misalignment/
>
>>
>> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
>> ---
>> The motivation here is that I'd like to get rid of _to_cpup()
>> entirely: we don't have many places that use it.
>> ---
>>  migration/migration.c | 12 ++++++------
>>  1 file changed, 6 insertions(+), 6 deletions(-)
>>
>
> Reviewed-by: Eric Blake <eblake@redhat.com>

Thanks. I just noticed that I missed the use of cpu_to_be64w()
for loads, so I'll send a v2.

-- PMM

      reply	other threads:[~2016-06-10 16:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-10 15:01 [Qemu-devel] [PATCH] migration: Don't use *_to_cpup() Peter Maydell
2016-06-10 15:05 ` Eric Blake
2016-06-10 16:02   ` Peter Maydell [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=CAFEAcA82VzKsQFpXfCFvnaA-fC3C8D6TWQ-DDHjMtcqwfjP4BA@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=amit.shah@redhat.com \
    --cc=eblake@redhat.com \
    --cc=patches@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /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).