From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59039) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bBOtQ-0004dN-La for qemu-devel@nongnu.org; Fri, 10 Jun 2016 12:02:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bBOtM-00014n-7i for qemu-devel@nongnu.org; Fri, 10 Jun 2016 12:02:41 -0400 Received: from mail-vk0-x22a.google.com ([2607:f8b0:400c:c05::22a]:33728) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bBOtL-00014g-JX for qemu-devel@nongnu.org; Fri, 10 Jun 2016 12:02:40 -0400 Received: by mail-vk0-x22a.google.com with SMTP id d64so103425172vkb.0 for ; Fri, 10 Jun 2016 09:02:39 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <575AD753.2000609@redhat.com> References: <1465570872-23642-1-git-send-email-peter.maydell@linaro.org> <575AD753.2000609@redhat.com> From: Peter Maydell Date: Fri, 10 Jun 2016 17:02:19 +0100 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH] migration: Don't use *_to_cpup() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: QEMU Developers , Amit Shah , Juan Quintela , Patch Tracking On 10 June 2016 at 16:05, Eric Blake 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 >> --- >> 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 Thanks. I just noticed that I missed the use of cpu_to_be64w() for loads, so I'll send a v2. -- PMM