From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kwg39-0008O8-Mf for qemu-devel@nongnu.org; Sun, 02 Nov 2008 11:43:39 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kwg38-0008Nu-6g for qemu-devel@nongnu.org; Sun, 02 Nov 2008 11:43:39 -0500 Received: from [199.232.76.173] (port=49769 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kwg38-0008Nr-1d for qemu-devel@nongnu.org; Sun, 02 Nov 2008 11:43:38 -0500 Received: from fmmailgate02.web.de ([217.72.192.227]:50769) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kwg36-0007lk-Lt for qemu-devel@nongnu.org; Sun, 02 Nov 2008 11:43:37 -0500 Message-ID: <490DD8AE.4090804@web.de> Date: Sun, 02 Nov 2008 17:43:26 +0100 From: Jan Kiszka MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigEC3A7A5E6E14B42B7769755E" Sender: jan.kiszka@web.de Subject: [Qemu-devel] [PATCH] Fix warnings: etraxfs_dma.c Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: edgar.iglesias@gmail.com This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigEC3A7A5E6E14B42B7769755E Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Signed-off-by: Jan Kiszka --- hw/etraxfs_dma.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) Index: b/hw/etraxfs_dma.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- a/hw/etraxfs_dma.c +++ b/hw/etraxfs_dma.c @@ -406,7 +406,8 @@ static void channel_out_run(struct fs_dm (uint32_t)ctrl->channels[c].current_d.after, saved_data_buf)); =20 - len =3D (uint32_t)ctrl->channels[c].current_d.after; + len =3D (uint32_t)(unsigned long) + ctrl->channels[c].current_d.after; len -=3D saved_data_buf; =20 if (len > sizeof buf) @@ -426,8 +427,8 @@ static void channel_out_run(struct fs_dm =20 saved_data_buf +=3D len; =20 - if (saved_data_buf =3D=3D - (uint32_t)ctrl->channels[c].current_d.after) { + if (saved_data_buf =3D=3D (uint32_t)(unsigned long) + ctrl->channels[c].current_d.after) { /* Done. Step to next. */ if (ctrl->channels[c].current_d.out_eop) { /* TODO: signal eop to the client. */ @@ -451,7 +452,8 @@ static void channel_out_run(struct fs_dm channel_stop(ctrl, c); } else { ctrl->channels[c].regs[RW_SAVED_DATA] =3D - (uint32_t)ctrl->channels[c].current_d.next; + (uint32_t)(unsigned long)ctrl-> + channels[c].current_d.next; /* Load new descriptor. */ channel_load_d(ctrl, c); saved_data_buf =3D (uint32_t)(unsigned long) @@ -477,7 +479,7 @@ static int channel_in_process(struct fs_ return 0; =20 saved_data_buf =3D channel_reg(ctrl, c, RW_SAVED_DATA_BUF); - len =3D (uint32_t)ctrl->channels[c].current_d.after; + len =3D (uint32_t)(unsigned long)ctrl->channels[c].current_d.after; len -=3D saved_data_buf; =09 if (len > buflen) @@ -487,7 +489,7 @@ static int channel_in_process(struct fs_ saved_data_buf +=3D len; =20 if (saved_data_buf =3D=3D - (uint32_t)ctrl->channels[c].current_d.after + (uint32_t)(unsigned long)ctrl->channels[c].current_d.after || eop) { uint32_t r_intr =3D ctrl->channels[c].regs[R_INTR]; =20 @@ -524,10 +526,11 @@ static int channel_in_process(struct fs_ channel_stop(ctrl, c); } else { ctrl->channels[c].regs[RW_SAVED_DATA] =3D - (uint32_t)ctrl->channels[c].current_d.next; + (uint32_t)(unsigned long)ctrl-> + channels[c].current_d.next; /* Load new descriptor. */ channel_load_d(ctrl, c); - saved_data_buf =3D (uint32_t) + saved_data_buf =3D (uint32_t)(unsigned long) ctrl->channels[c].current_d.buf; } } --------------enigEC3A7A5E6E14B42B7769755E 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.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkkN2LMACgkQniDOoMHTA+lbowCdF7UCqlDOBx8wJPAdwSglpji4 bH4An0kwG6fFu5xje0h7lMRjfm3DJMXK =ATUZ -----END PGP SIGNATURE----- --------------enigEC3A7A5E6E14B42B7769755E--