From: Jan Kiszka <jan.kiszka-kv7WeFo6aLtBDgjK7y7TUQ@public.gmane.org>
To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: [PATCH] qemu: fix some warnings
Date: Mon, 21 Jan 2008 13:46:11 +0100 [thread overview]
Message-ID: <47949413.4060804@siemens.com> (raw)
Here are 4 more warnings fixes (actually, I should sent 2 of them to
qemu...). Nothing critical, just less noise during compilation.
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.
Jan
---
qemu/hw/pc.c | 31 -------------------------------
qemu/kvm-tpr-opt.c | 13 -------------
qemu/migration.c | 4 ++--
qemu/vl.c | 2 +-
4 files changed, 3 insertions(+), 47 deletions(-)
Index: b/qemu/hw/pc.c
===================================================================
--- a/qemu/hw/pc.c
+++ b/qemu/hw/pc.c
@@ -450,37 +450,6 @@ static void generate_bootsect(uint32_t g
bdrv_set_boot_sector(drives_table[hda].bdrv, bootsect, sizeof(bootsect));
}
-static int load_kernel(const char *filename, uint8_t *addr,
- uint8_t *real_addr)
-{
- int fd, size;
- int setup_sects;
-
- fd = open(filename, O_RDONLY | O_BINARY);
- if (fd < 0)
- return -1;
-
- /* load 16 bit code */
- if (read(fd, real_addr, 512) != 512)
- goto fail;
- setup_sects = real_addr[0x1F1];
- if (!setup_sects)
- setup_sects = 4;
- if (read(fd, real_addr + 512, setup_sects * 512) !=
- setup_sects * 512)
- goto fail;
-
- /* load 32 bit code */
- size = read(fd, addr, 16 * 1024 * 1024);
- if (size < 0)
- goto fail;
- close(fd);
- return size;
- fail:
- close(fd);
- return -1;
-}
-
static long get_file_size(FILE *f)
{
long where, size;
Index: b/qemu/kvm-tpr-opt.c
===================================================================
--- a/qemu/kvm-tpr-opt.c
+++ b/qemu/kvm-tpr-opt.c
@@ -76,19 +76,6 @@ static void write_byte_virt(CPUState *en
stb_phys(map_addr(&sregs, virt, NULL), b);
}
-static uint32_t get_bios_map(CPUState *env, unsigned *perms)
-{
- uint32_t v;
- struct kvm_sregs sregs;
-
- kvm_get_sregs(kvm_context, env->cpu_index, &sregs);
-
- for (v = -4096u; v != 0; v -= 4096)
- if (map_addr(&sregs, v, perms) == 0xe0000)
- return v;
- return -1u;
-}
-
struct vapic_bios {
char signature[8];
uint32_t virt_base;
Index: b/qemu/migration.c
===================================================================
--- a/qemu/migration.c
+++ b/qemu/migration.c
@@ -808,7 +808,7 @@ static int migrate_incoming_fd(int fd)
size = qemu_get_be32(f);
if (size != phys_ram_size) {
- fprintf(stderr, "migration: memory size mismatch: recv %u mine %u\n",
+ fprintf(stderr, "migration: memory size mismatch: recv %u mine %lu\n",
size, phys_ram_size);
return MIG_STAT_DST_MEM_SIZE_MISMATCH;
}
@@ -1063,7 +1063,7 @@ void do_info_migration(void)
term_printf("Transfer rate %3.1f mb/s\n",
(double)s->bps / (1024 * 1024));
term_printf("Iteration %d\n", s->iteration);
- term_printf("Transferred %d/%d pages\n", s->updated_pages, phys_ram_size >> TARGET_PAGE_BITS);
+ term_printf("Transferred %d/%lu pages\n", s->updated_pages, phys_ram_size >> TARGET_PAGE_BITS);
if (s->iteration)
term_printf("Last iteration found %d dirty pages\n", s->last_updated_pages);
} else {
Index: b/qemu/vl.c
===================================================================
--- a/qemu/vl.c
+++ b/qemu/vl.c
@@ -8862,7 +8862,7 @@ int main(int argc, char **argv)
if (ram_size <= 0)
help(1);
if (ram_size > PHYS_RAM_MAX_SIZE) {
- fprintf(stderr, "qemu: at most %d MB RAM can be simulated\n",
+ fprintf(stderr, "qemu: at most %llu MB RAM can be simulated\n",
PHYS_RAM_MAX_SIZE / (1024 * 1024));
exit(1);
}
--
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/
next reply other threads:[~2008-01-21 12:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-21 12:46 Jan Kiszka [this message]
[not found] ` <47949413.4060804-kv7WeFo6aLtBDgjK7y7TUQ@public.gmane.org>
2008-01-21 13:06 ` [PATCH] qemu: fix some warnings Jan Kiszka
[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=47949413.4060804@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 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.