From 2a089dfddd9cad225a0c28f952c80497852b1077 Mon Sep 17 00:00:00 2001 From: yajin Date: Mon, 13 Apr 2009 17:28:15 +0800 Subject: [PATCH] code clean to kill warnning --- hw/mips_loongson2f.c | 13 ++++++++----- hw/mips_loongson2f.h | 4 ---- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/hw/mips_loongson2f.c b/hw/mips_loongson2f.c index d52f664d72..711bad9ea0 100755 --- a/hw/mips_loongson2f.c +++ b/hw/mips_loongson2f.c @@ -24,6 +24,9 @@ #include "mips_loongson2f.h" +typedef target_phys_addr_t pci_addr_t; +#include "pci_host.h" + /*The bonito north bridge is integrated in loongson 2f */ typedef struct bonitoState { @@ -114,7 +117,7 @@ static void debug_out(uint32_t flag, const char *format, ...) #endif - +#if 0 uint32_t loongson_badwidth_read8(void *opaque, target_phys_addr_t addr) { LOONGSON_8B_REG(addr); @@ -142,7 +145,7 @@ void loongson_badwidth_write16(void *opaque, target_phys_addr_t addr, LOONGSON_16B_REG(addr); exit(-1); } - +#endif uint32_t loongson_badwidth_read32(void *opaque, target_phys_addr_t addr) { LOONGSON_32B_REG(addr); @@ -219,7 +222,7 @@ static void bonito_pci_write32(void *opaque, target_phys_addr_t addr, case 0x20: case 0x24: case 0x40: - case 0x44: + case 0x44: case 0x48: case 0x4c: case 0x50: @@ -353,7 +356,7 @@ static void bonito_write32(void *opaque, target_phys_addr_t addr, case 0x30: case 0x3c: case 0x40: - case 0x44: + case 0x44: case 0x48: case 0x4c: case 0x50: @@ -454,7 +457,7 @@ CPUWriteMemoryFunc *bonito_writefn[] = { static uint32_t bonito_pciconf_read32(void *opaque, target_phys_addr_t addr) { bonito_state *s = (bonito_state *) opaque; - int bus_no,dev_no,fun_no,reg_no; + int fun_no,reg_no; uint32_t pci_addr; debug_out(DEBUG_BONITO, "%s addr "TARGET_FMT_plx" pc "TARGET_FMT_plx"\n",__FUNCTION__ ,addr, s->env->active_tc.PC); diff --git a/hw/mips_loongson2f.h b/hw/mips_loongson2f.h index 6a556cff5e..b2fd1eec22 100755 --- a/hw/mips_loongson2f.h +++ b/hw/mips_loongson2f.h @@ -32,10 +32,6 @@ #include "pci.h" -typedef target_phys_addr_t pci_addr_t; -#include "pci_host.h" - - #define DEBUG_INVALID_WIDTH 1 -- 2.11.4.GIT