qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org, patches@linaro.org
Subject: Re: [Qemu-devel] [PATCH] hw/usb/dev-network.c: Use ldl_le_p() and stl_le_p()
Date: Mon, 13 Jun 2016 13:19:08 +0200	[thread overview]
Message-ID: <1465816748.32424.59.camel@redhat.com> (raw)
In-Reply-To: <1465573077-29221-1-git-send-email-peter.maydell@linaro.org>

On Fr, 2016-06-10 at 16:37 +0100, Peter Maydell wrote:
> Use stl_le_p() and ldl_le_p() to read and write data from
> buffers, rather than using pointer casts and cpu_to_le32()
> for writes and le32_to_cpup() for reads. This:
>  * avoids lots of casts
>  * works even if the buffer isn't as aligned as the host would like
>  * avoids using the *_to_cpup() functions which we want to get rid of
> 
> Note that there may still be some places where a pointer from the
> guest is cast to a pointer to a host structure; these would also
> have to be changed for the device to work on a host CPU which
> enforces alignment restrictions.
> 

Added to usb queue.

thanks,
  Gerd

      parent reply	other threads:[~2016-06-13 11:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-10 15:37 [Qemu-devel] [PATCH] hw/usb/dev-network.c: Use ldl_le_p() and stl_le_p() Peter Maydell
2016-06-11 20:21 ` Eric Blake
2016-06-13 11:19 ` Gerd Hoffmann [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=1465816748.32424.59.camel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=patches@linaro.org \
    --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).