From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39216) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YRO5r-0000gz-7M for qemu-devel@nongnu.org; Fri, 27 Feb 2015 11:48:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YRO5o-00081S-CV for qemu-devel@nongnu.org; Fri, 27 Feb 2015 11:48:51 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49749) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YRO5o-00081K-68 for qemu-devel@nongnu.org; Fri, 27 Feb 2015 11:48:48 -0500 Date: Fri, 27 Feb 2015 16:48:43 +0000 From: Stefan Hajnoczi Message-ID: <20150227164843.GA32542@stefanha-thinkpad.redhat.com> References: <1425046037-2092-1-git-send-email-jiri@resnulli.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="sdtB3X0nJg68CQEu" Content-Disposition: inline In-Reply-To: <1425046037-2092-1-git-send-email-jiri@resnulli.us> Subject: Re: [Qemu-devel] [patch qemu] rocker: fix 32bit build List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jiri Pirko Cc: sfeldma@gmail.com, qemu-devel@nongnu.org --sdtB3X0nJg68CQEu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Feb 27, 2015 at 03:07:17PM +0100, Jiri Pirko wrote: > For printf format of uint64_t and size_t use TARGET_FMT_plx and %zu >=20 > Signed-off-by: Jiri Pirko > --- > hw/net/rocker/rocker.c | 32 +++++++++++++++++--------------- > hw/net/rocker/rocker_desc.c | 6 +++--- > 2 files changed, 20 insertions(+), 18 deletions(-) Thanks! In the future, please send a new revision of the original series instead of a fix-up patch. Adding a patch on top will break git-bisect(1) since there are a couple of commits with the build failure before your fix. I am squashing this into the "rocker: add new rocker switch device" commit so that git-bisect(1) continues to work. > diff --git a/hw/net/rocker/rocker.c b/hw/net/rocker/rocker.c > index 672cf5a..4105275 100644 > --- a/hw/net/rocker/rocker.c > +++ b/hw/net/rocker/rocker.c > @@ -774,8 +774,8 @@ static void rocker_io_writel(void *opaque, hwaddr add= r, uint32_t val) > } > break; > default: > - DPRINTF("not implemented dma reg write(l) addr=3D0x%lx " > - "val=3D0x%08x (ring %d, addr=3D0x%02x)\n", > + DPRINTF("not implemented dma reg write(l) addr=3D0x" TARGET_= FMT_plx > + " val=3D0x%08x (ring %d, addr=3D0x%02x)\n", > addr, val, index, offset); > break; > } > @@ -816,7 +816,8 @@ static void rocker_io_writel(void *opaque, hwaddr add= r, uint32_t val) > r->lower32 =3D 0; > break; > default: > - DPRINTF("not implemented write(l) addr=3D0x%lx val=3D0x%08x\n", = addr, val); > + DPRINTF("not implemented write(l) addr=3D0x" TARGET_FMT_plx > + " val=3D0x%08x\n", addr, val); > break; > } > } > @@ -834,8 +835,8 @@ static void rocker_io_writeq(void *opaque, hwaddr add= r, uint64_t val) > desc_ring_set_base_addr(r->rings[index], val); > break; > default: > - DPRINTF("not implemented dma reg write(q) addr=3D0x%lx " > - "val=3D0x%016lx (ring %d, offset=3D0x%02x)\n", > + DPRINTF("not implemented dma reg write(q) addr=3D0x" TARGET_= FMT_plx > + " val=3D0x" TARGET_FMT_plx " (ring %d, offset=3D0x%0= 2x)\n", > addr, val, index, offset); > break; > } > @@ -853,8 +854,8 @@ static void rocker_io_writeq(void *opaque, hwaddr add= r, uint64_t val) > rocker_port_phys_enable_write(r, val); > break; > default: > - DPRINTF("not implemented write(q) addr=3D0x%lx val=3D0x%016lx\n", > - addr, val); > + DPRINTF("not implemented write(q) addr=3D0x" TARGET_FMT_plx > + " val=3D0x" TARGET_FMT_plx "\n", addr, val); > break; > } > } > @@ -945,7 +946,8 @@ static const char *rocker_reg_name(void *opaque, hwad= dr addr) > static void rocker_mmio_write(void *opaque, hwaddr addr, uint64_t val, > unsigned size) > { > - DPRINTF("Write %s addr %lx, size %u, val %lx\n", > + DPRINTF("Write %s addr " TARGET_FMT_plx > + ", size %u, val " TARGET_FMT_plx "\n", > rocker_reg_name(opaque, addr), addr, size, val); > =20 > switch (size) { > @@ -1017,8 +1019,8 @@ static uint32_t rocker_io_readl(void *opaque, hwadd= r addr) > ret =3D desc_ring_get_credits(r->rings[index]); > break; > default: > - DPRINTF("not implemented dma reg read(l) addr=3D0x%lx " > - "(ring %d, addr=3D0x%02x)\n", addr, index, offset); > + DPRINTF("not implemented dma reg read(l) addr=3D0x" TARGET_F= MT_plx > + " (ring %d, addr=3D0x%02x)\n", addr, index, offset); > ret =3D 0; > break; > } > @@ -1072,7 +1074,7 @@ static uint32_t rocker_io_readl(void *opaque, hwadd= r addr) > ret =3D (uint32_t)(r->switch_id >> 32); > break; > default: > - DPRINTF("not implemented read(l) addr=3D0x%lx\n", addr); > + DPRINTF("not implemented read(l) addr=3D0x" TARGET_FMT_plx "\n",= addr); > ret =3D 0; > break; > } > @@ -1093,8 +1095,8 @@ static uint64_t rocker_io_readq(void *opaque, hwadd= r addr) > ret =3D desc_ring_get_base_addr(r->rings[index]); > break; > default: > - DPRINTF("not implemented dma reg read(q) addr=3D0x%lx " > - "(ring %d, addr=3D0x%02x)\n", addr, index, offset); > + DPRINTF("not implemented dma reg read(q) addr=3D0x" TARGET_F= MT_plx > + " (ring %d, addr=3D0x%02x)\n", addr, index, offset); > ret =3D 0; > break; > } > @@ -1122,7 +1124,7 @@ static uint64_t rocker_io_readq(void *opaque, hwadd= r addr) > ret =3D r->switch_id; > break; > default: > - DPRINTF("not implemented read(q) addr=3D0x%lx\n", addr); > + DPRINTF("not implemented read(q) addr=3D0x" TARGET_FMT_plx "\n",= addr); > ret =3D 0; > break; > } > @@ -1131,7 +1133,7 @@ static uint64_t rocker_io_readq(void *opaque, hwadd= r addr) > =20 > static uint64_t rocker_mmio_read(void *opaque, hwaddr addr, unsigned siz= e) > { > - DPRINTF("Read %s addr %lx, size %u\n", > + DPRINTF("Read %s addr " TARGET_FMT_plx ", size %u\n", > rocker_reg_name(opaque, addr), addr, size); > =20 > switch (size) { > diff --git a/hw/net/rocker/rocker_desc.c b/hw/net/rocker/rocker_desc.c > index 83c2b98..0a6dfae 100644 > --- a/hw/net/rocker/rocker_desc.c > +++ b/hw/net/rocker/rocker_desc.c > @@ -83,7 +83,7 @@ int desc_set_buf(DescInfo *info, size_t tlv_size) > =20 > if (tlv_size > info->buf_size) { > DPRINTF("ERROR: trying to write more to desc buf than it " > - "can hold buf_size %ld tlv_size %ld\n", > + "can hold buf_size %zu tlv_size %zu\n", > info->buf_size, tlv_size); > return -ROCKER_EMSGSIZE; > } > @@ -112,8 +112,8 @@ static bool desc_ring_empty(DescRing *ring) > bool desc_ring_set_base_addr(DescRing *ring, uint64_t base_addr) > { > if (base_addr & 0x7) { > - DPRINTF("ERROR: ring[%d] desc base addr (0x%lx) not 8-byte align= ed\n", > - ring->index, base_addr); > + DPRINTF("ERROR: ring[%d] desc base addr (0x" TARGET_FMT_plx > + ") not 8-byte aligned\n", ring->index, base_addr); > return false; > } > =20 > --=20 > 1.9.3 >=20 --sdtB3X0nJg68CQEu Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJU8J/rAAoJEJykq7OBq3PI62YIAKVeBGLo0jurPAr4+gDRijlT tWIis6EhOSY1XyrLp6tPxlfpCEBI0zuE1xr4dQVLxbAD9XPJjmNarwe1ETANq/Jd Igy1S22zROPAYJDn/10ie4BuLLDegDCNmHjRdSCisgjg6sNq4Ech8Rt3hK9LC/b4 VgcQxiO6s0EwZxFVvbxhZg48ZsGPXYdai8+rb2RHlasDzUDIu3comt4MJWXg9zk4 0WmReAxBHb+da2UhZqz883VSGBj42oGPB/lxyqc0rcI5Hhmz0nyoAeAyK13ay5dS 2iLGlx2xyWai6sOppC0a8EVDhM926VjPCgdqbhIfuvAHSmijZsdfqbQgiF7OF50= =ugVp -----END PGP SIGNATURE----- --sdtB3X0nJg68CQEu--