From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58720) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bBNzH-0004X9-FX for qemu-devel@nongnu.org; Fri, 10 Jun 2016 11:04:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bBNzD-0007RR-FW for qemu-devel@nongnu.org; Fri, 10 Jun 2016 11:04:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47587) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bBNzD-0007RJ-9K for qemu-devel@nongnu.org; Fri, 10 Jun 2016 11:04:39 -0400 References: <1465570836-22211-1-git-send-email-peter.maydell@linaro.org> From: Eric Blake Message-ID: <575AD705.2010901@redhat.com> Date: Fri, 10 Jun 2016 09:04:37 -0600 MIME-Version: 1.0 In-Reply-To: <1465570836-22211-1-git-send-email-peter.maydell@linaro.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="N8XmgHmu6RuT5nExbraG4jCTiRhgDlmOL" Subject: Re: [Qemu-devel] [PATCH] nbd: Don't use *_to_cpup() functions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , qemu-devel@nongnu.org Cc: Paolo Bonzini , patches@linaro.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --N8XmgHmu6RuT5nExbraG4jCTiRhgDlmOL Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 >=20 > Signed-off-by: Peter Maydell > --- > 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(-) >=20 Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --N8XmgHmu6RuT5nExbraG4jCTiRhgDlmOL Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJXWtcFAAoJEKeha0olJ0Nqn5MIAJw7QmtltsQLxZv2GY0A7+iE 9YhVui0rnU6u8B6ih7AaVgCI3K6YUpsaA87kM2s/F79pCYSlW3cxSNBk2mvSjvVh 6FsRHznBOSarWfwA0I2Erbqpy6SOOa1y3j4aHPIbq3Eg4yX/UQ8DIqpHqKEMGgyO rCs7n4ddErI5OwZtyVTqGLxzIwSMrVisUZhUHUcba2SVffrNIRIn3qI56Uq5aXXh L1H39/51o0pI9O3WyBkXTGNpsLdRxMjrz9S62PQHp1GMRweRJfEr0EyjzcAXqwd8 8dPl+Uz/2ygB7k9qibqUcgYYoVLw5cmwTh3IOWIQPQcn8ezQHoWnOkNR1tva8so= =0eb3 -----END PGP SIGNATURE----- --N8XmgHmu6RuT5nExbraG4jCTiRhgDlmOL--