From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48504) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCPti-0000R4-Ke for qemu-devel@nongnu.org; Mon, 13 Jun 2016 07:19:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bCPtf-0000Ia-Cr for qemu-devel@nongnu.org; Mon, 13 Jun 2016 07:19:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35985) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCPtf-0000IP-6N for qemu-devel@nongnu.org; Mon, 13 Jun 2016 07:19:11 -0400 Message-ID: <1465816748.32424.59.camel@redhat.com> From: Gerd Hoffmann Date: Mon, 13 Jun 2016 13:19:08 +0200 In-Reply-To: <1465573077-29221-1-git-send-email-peter.maydell@linaro.org> References: <1465573077-29221-1-git-send-email-peter.maydell@linaro.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] hw/usb/dev-network.c: Use ldl_le_p() and stl_le_p() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel@nongnu.org, patches@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 >=20 > 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. >=20 Added to usb queue. thanks, Gerd