public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka-kv7WeFo6aLtBDgjK7y7TUQ@public.gmane.org>
To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: [PATCH] qemu: fix some warnings
Date: Mon, 21 Jan 2008 14:06:01 +0100	[thread overview]
Message-ID: <479498B9.1000005@siemens.com> (raw)
In-Reply-To: <47949413.4060804-kv7WeFo6aLtBDgjK7y7TUQ@public.gmane.org>

Jan Kiszka wrote:
> At this chance, can anyone comment on these uint32_t types?
> 
> static int subpage_register (subpage_t *mmio, uint32_t start, uint32_t end,
>                              int memory);
> static void *subpage_init (target_phys_addr_t base, uint32_t *phys,
>                            int orig_memory);
> 
> Shouldn't they be target_phys_addr_t? Can't this cause troubles when
> building 64-bit targets? Looks like it's even a generic qemu issue.

At least it should cause no harm to convert to target_phys_addr_t, so
here is a cleanup patch for qemu/exec.c.

Jan

---
 qemu/exec.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

Index: kvm-userspace/qemu/exec.c
===================================================================
--- kvm-userspace.orig/qemu/exec.c
+++ kvm-userspace/qemu/exec.c
@@ -2028,9 +2028,9 @@ static inline void tlb_set_dirty(CPUStat
 }
 #endif /* defined(CONFIG_USER_ONLY) */
 
-static int subpage_register (subpage_t *mmio, uint32_t start, uint32_t end,
-                             int memory);
-static void *subpage_init (target_phys_addr_t base, uint32_t *phys,
+static int subpage_register (subpage_t *mmio, target_phys_addr_t start,
+                             target_phys_addr_t end, int memory);
+static void *subpage_init (target_phys_addr_t base, target_phys_addr_t *phys,
                            int orig_memory);
 #define CHECK_SUBPAGE(addr, start_addr, start_addr2, end_addr, end_addr2, \
                       need_subpage)                                     \
@@ -2138,7 +2138,7 @@ ram_addr_t qemu_ram_alloc(unsigned long 
 {
     ram_addr_t addr;
     if ((phys_ram_alloc_offset + size) > phys_ram_size) {
-        fprintf(stderr, "Not enough memory (requested_size = %lu, max memory = %d)\n",
+        fprintf(stderr, "Not enough memory (requested_size = %lu, max memory = %lu)\n",
                 size, phys_ram_size);
         abort();
     }
@@ -2455,8 +2455,8 @@ static CPUWriteMemoryFunc *subpage_write
     &subpage_writel,
 };
 
-static int subpage_register (subpage_t *mmio, uint32_t start, uint32_t end,
-                             int memory)
+static int subpage_register (subpage_t *mmio, target_phys_addr_t start,
+                             target_phys_addr_t end, int memory)
 {
     int idx, eidx;
 
@@ -2478,7 +2478,7 @@ static int subpage_register (subpage_t *
     return 0;
 }
 
-static void *subpage_init (target_phys_addr_t base, uint32_t *phys,
+static void *subpage_init (target_phys_addr_t base, target_phys_addr_t *phys,
                            int orig_memory)
 {
     subpage_t *mmio;

-- 
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

  parent reply	other threads:[~2008-01-21 13:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-21 12:46 [PATCH] qemu: fix some warnings Jan Kiszka
     [not found] ` <47949413.4060804-kv7WeFo6aLtBDgjK7y7TUQ@public.gmane.org>
2008-01-21 13:06   ` Jan Kiszka [this message]
     [not found]     ` <479498B9.1000005-kv7WeFo6aLtBDgjK7y7TUQ@public.gmane.org>
2008-01-21 14:00       ` Carlo Marcelo Arenas Belon
2008-01-24  6:34       ` Avi Kivity
2008-01-21 14:22   ` Carlo Marcelo Arenas Belon
2008-01-22 10:06     ` Jan Kiszka

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=479498B9.1000005@siemens.com \
    --to=jan.kiszka-kv7wefo6altbdgjk7y7tuq@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox