From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Gibson Subject: Re: [kvm-unit-tests PATCH v3 03/17] lib: asm-generic: add missing casts Date: Mon, 15 Feb 2016 09:57:21 +1100 Message-ID: <20160214225721.GH2732@voom.fritz.box> References: <1455380910-30604-1-git-send-email-drjones@redhat.com> <1455380910-30604-4-git-send-email-drjones@redhat.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Tu8ztk+XgTAiG9Id" Cc: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, thuth@redhat.com, dgibson@redhat.com, agraf@suse.de, lvivier@redhat.com, pbonzini@redhat.com To: Andrew Jones Return-path: Received: from ozlabs.org ([103.22.144.67]:40063 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753479AbcBOAEJ (ORCPT ); Sun, 14 Feb 2016 19:04:09 -0500 Content-Disposition: inline In-Reply-To: <1455380910-30604-4-git-send-email-drjones@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: --Tu8ztk+XgTAiG9Id Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Feb 13, 2016 at 05:28:16PM +0100, Andrew Jones wrote: > Signed-off-by: Andrew Jones Reviewed-by: David Gibson > --- > lib/asm-generic/io.h | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) >=20 > diff --git a/lib/asm-generic/io.h b/lib/asm-generic/io.h > index a9939d3a5921f..931415a465b74 100644 > --- a/lib/asm-generic/io.h > +++ b/lib/asm-generic/io.h > @@ -104,27 +104,27 @@ static inline u64 __bswap64(u64 x) > #endif > =20 > #define le16_to_cpu(x) \ > - ({ u16 __r =3D __cpu_is_be() ? __bswap16(x) : (x); __r; }) > + ({ u16 __r =3D __cpu_is_be() ? __bswap16(x) : ((u16)x); __r; }) > #define cpu_to_le16 le16_to_cpu > =20 > #define le32_to_cpu(x) \ > - ({ u32 __r =3D __cpu_is_be() ? __bswap32(x) : (x); __r; }) > + ({ u32 __r =3D __cpu_is_be() ? __bswap32(x) : ((u32)x); __r; }) > #define cpu_to_le32 le32_to_cpu > =20 > #define le64_to_cpu(x) \ > - ({ u64 __r =3D __cpu_is_be() ? __bswap64(x) : (x); __r; }) > + ({ u64 __r =3D __cpu_is_be() ? __bswap64(x) : ((u64)x); __r; }) > #define cpu_to_le64 le64_to_cpu > =20 > #define be16_to_cpu(x) \ > - ({ u16 __r =3D !__cpu_is_be() ? __bswap16(x) : (x); __r; }) > + ({ u16 __r =3D !__cpu_is_be() ? __bswap16(x) : ((u16)x); __r; }) > #define cpu_to_be16 be16_to_cpu > =20 > #define be32_to_cpu(x) \ > - ({ u32 __r =3D !__cpu_is_be() ? __bswap32(x) : (x); __r; }) > + ({ u32 __r =3D !__cpu_is_be() ? __bswap32(x) : ((u32)x); __r; }) > #define cpu_to_be32 be32_to_cpu > =20 > #define be64_to_cpu(x) \ > - ({ u64 __r =3D !__cpu_is_be() ? __bswap64(x) : (x); __r; }) > + ({ u64 __r =3D !__cpu_is_be() ? __bswap64(x) : ((u64)x); __r; }) > #define cpu_to_be64 be64_to_cpu > =20 > #ifndef rmb --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --Tu8ztk+XgTAiG9Id Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWwQZRAAoJEGw4ysog2bOSAE8P/3Wu8XLdQ1BMUaLntS6Cu5h5 zOHrPnG7W0ke1deUoTQMzXrHyF30qCRXQhQFQ0VexTg7yB6majuXvj/9CM6e3lF5 buR3jOgo4BmgfpRWZEAmHrfoiYtU3angtD23rQ3zhN2PoGpe+BTW/8vh76JhPk2y THxae8EQf8IYbBKCX9mOlv15Uurxl1f0/Z/l73VbVxTbbRWvSlpNFyNFCGl+Qt78 AkZXYvMwLoMXNVb93XKVX1/yuFtF5svUiNefQxb55cJIutT9Mh3kt2ElIrWtvMCa h+PSHgxMgb/TMEeQANhXgpDPO/zm19KOkQQJvcgIliPG8gnIwrvhFT+oof/wOYlG swRgaGx341gXd5l376WDvqF3HTahTsKOUBEq/m5gYokcrhUGxJSu+w7zcfS3dxE5 v+C+alRWBIgOMdN9KmPC64Kb17HRXRpRVhyS7OKDX7rxviFC3gFMxzV7h4AW7LL6 I0l3wEJH3UFyX6pQ/uo/0iCtk50wHHNqHVVZ239Q5qFKuuVCay7FQ489mEj/jE6O 65RU3fP4qRAQA/dVsDm92XnP2daOJVUG9QFQSh5Zfgdagf9FaIwxMsJVjrOh4pcf r4tGK5G+9Mdb1R7DLWzsGpgK1uzVMphD8EeP67dvZoxhQOawkGFa0DBFDPGq2tGj /IAE9iqPIcyMVBa5olgH =lXK/ -----END PGP SIGNATURE----- --Tu8ztk+XgTAiG9Id--