From: Jan Kiszka <jan.kiszka@web.de>
To: qemu-devel@nongnu.org
Cc: edgar.iglesias@gmail.com
Subject: [Qemu-devel] [PATCH] Fix warnings: etraxfs_dma.c
Date: Sun, 02 Nov 2008 17:43:26 +0100 [thread overview]
Message-ID: <490DD8AE.4090804@web.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 2499 bytes --]
Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
---
hw/etraxfs_dma.c | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
Index: b/hw/etraxfs_dma.c
===================================================================
--- 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));
- len = (uint32_t)ctrl->channels[c].current_d.after;
+ len = (uint32_t)(unsigned long)
+ ctrl->channels[c].current_d.after;
len -= saved_data_buf;
if (len > sizeof buf)
@@ -426,8 +427,8 @@ static void channel_out_run(struct fs_dm
saved_data_buf += len;
- if (saved_data_buf ==
- (uint32_t)ctrl->channels[c].current_d.after) {
+ if (saved_data_buf == (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] =
- (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 = (uint32_t)(unsigned long)
@@ -477,7 +479,7 @@ static int channel_in_process(struct fs_
return 0;
saved_data_buf = channel_reg(ctrl, c, RW_SAVED_DATA_BUF);
- len = (uint32_t)ctrl->channels[c].current_d.after;
+ len = (uint32_t)(unsigned long)ctrl->channels[c].current_d.after;
len -= saved_data_buf;
if (len > buflen)
@@ -487,7 +489,7 @@ static int channel_in_process(struct fs_
saved_data_buf += len;
if (saved_data_buf ==
- (uint32_t)ctrl->channels[c].current_d.after
+ (uint32_t)(unsigned long)ctrl->channels[c].current_d.after
|| eop) {
uint32_t r_intr = ctrl->channels[c].regs[R_INTR];
@@ -524,10 +526,11 @@ static int channel_in_process(struct fs_
channel_stop(ctrl, c);
} else {
ctrl->channels[c].regs[RW_SAVED_DATA] =
- (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 = (uint32_t)
+ saved_data_buf = (uint32_t)(unsigned long)
ctrl->channels[c].current_d.buf;
}
}
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]
reply other threads:[~2008-11-02 16:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=490DD8AE.4090804@web.de \
--to=jan.kiszka@web.de \
--cc=edgar.iglesias@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.