Commit 9596ebb7012a19a45ca036a200acd617a93a321b

Authored by pbrook
1 parent 4c1b1bfe

Add statics and missing #includes for prototypes.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3683 c046a42c-6fe2-441c-8c8c-71466251a162
audio/audio.c
@@ -238,7 +238,7 @@ static char *audio_alloc_prefix (const char *s) @@ -238,7 +238,7 @@ static char *audio_alloc_prefix (const char *s)
238 return r; 238 return r;
239 } 239 }
240 240
241 -const char *audio_audfmt_to_string (audfmt_e fmt) 241 +static const char *audio_audfmt_to_string (audfmt_e fmt)
242 { 242 {
243 switch (fmt) { 243 switch (fmt) {
244 case AUD_FMT_U8: 244 case AUD_FMT_U8:
@@ -264,7 +264,8 @@ const char *audio_audfmt_to_string (audfmt_e fmt) @@ -264,7 +264,8 @@ const char *audio_audfmt_to_string (audfmt_e fmt)
264 return "S16"; 264 return "S16";
265 } 265 }
266 266
267 -audfmt_e audio_string_to_audfmt (const char *s, audfmt_e defval, int *defaultp) 267 +static audfmt_e audio_string_to_audfmt (const char *s, audfmt_e defval,
  268 + int *defaultp)
268 { 269 {
269 if (!strcasecmp (s, "u8")) { 270 if (!strcasecmp (s, "u8")) {
270 *defaultp = 0; 271 *defaultp = 0;
block-vvfat.c
@@ -175,7 +175,7 @@ static inline int array_roll(array_t* array,int index_to,int index_from,int coun @@ -175,7 +175,7 @@ static inline int array_roll(array_t* array,int index_to,int index_from,int coun
175 return 0; 175 return 0;
176 } 176 }
177 177
178 -inline int array_remove_slice(array_t* array,int index, int count) 178 +static inline int array_remove_slice(array_t* array,int index, int count)
179 { 179 {
180 assert(index >=0); 180 assert(index >=0);
181 assert(count > 0); 181 assert(count > 0);
@@ -186,13 +186,13 @@ inline int array_remove_slice(array_t* array,int index, int count) @@ -186,13 +186,13 @@ inline int array_remove_slice(array_t* array,int index, int count)
186 return 0; 186 return 0;
187 } 187 }
188 188
189 -int array_remove(array_t* array,int index) 189 +static int array_remove(array_t* array,int index)
190 { 190 {
191 return array_remove_slice(array, index, 1); 191 return array_remove_slice(array, index, 1);
192 } 192 }
193 193
194 /* return the index for a given member */ 194 /* return the index for a given member */
195 -int array_index(array_t* array, void* pointer) 195 +static int array_index(array_t* array, void* pointer)
196 { 196 {
197 size_t offset = (char*)pointer - array->pointer; 197 size_t offset = (char*)pointer - array->pointer;
198 assert(offset >= 0); 198 assert(offset >= 0);
@@ -124,7 +124,7 @@ void path_combine(char *dest, int dest_size, @@ -124,7 +124,7 @@ void path_combine(char *dest, int dest_size,
124 } 124 }
125 125
126 126
127 -void bdrv_register(BlockDriver *bdrv) 127 +static void bdrv_register(BlockDriver *bdrv)
128 { 128 {
129 if (!bdrv->bdrv_aio_read) { 129 if (!bdrv->bdrv_aio_read) {
130 /* add AIO emulation layer */ 130 /* add AIO emulation layer */
console.c
@@ -61,7 +61,7 @@ typedef struct QEMUFIFO { @@ -61,7 +61,7 @@ typedef struct QEMUFIFO {
61 int count, wptr, rptr; 61 int count, wptr, rptr;
62 } QEMUFIFO; 62 } QEMUFIFO;
63 63
64 -int qemu_fifo_write(QEMUFIFO *f, const uint8_t *buf, int len1) 64 +static int qemu_fifo_write(QEMUFIFO *f, const uint8_t *buf, int len1)
65 { 65 {
66 int l, len; 66 int l, len;
67 67
@@ -84,7 +84,7 @@ int qemu_fifo_write(QEMUFIFO *f, const uint8_t *buf, int len1) @@ -84,7 +84,7 @@ int qemu_fifo_write(QEMUFIFO *f, const uint8_t *buf, int len1)
84 return len1; 84 return len1;
85 } 85 }
86 86
87 -int qemu_fifo_read(QEMUFIFO *f, uint8_t *buf, int len1) 87 +static int qemu_fifo_read(QEMUFIFO *f, uint8_t *buf, int len1)
88 { 88 {
89 int l, len; 89 int l, len;
90 90
dyngen.c
@@ -232,7 +232,7 @@ enum { @@ -232,7 +232,7 @@ enum {
232 232
233 int do_swap; 233 int do_swap;
234 234
235 -void __attribute__((noreturn)) __attribute__((format (printf, 1, 2))) error(const char *fmt, ...) 235 +static void __attribute__((noreturn)) __attribute__((format (printf, 1, 2))) error(const char *fmt, ...)
236 { 236 {
237 va_list ap; 237 va_list ap;
238 va_start(ap, fmt); 238 va_start(ap, fmt);
@@ -243,7 +243,7 @@ void __attribute__((noreturn)) __attribute__((format (printf, 1, 2))) error(cons @@ -243,7 +243,7 @@ void __attribute__((noreturn)) __attribute__((format (printf, 1, 2))) error(cons
243 exit(1); 243 exit(1);
244 } 244 }
245 245
246 -void *load_data(int fd, long offset, unsigned int size) 246 +static void *load_data(int fd, long offset, unsigned int size)
247 { 247 {
248 char *data; 248 char *data;
249 249
elf_ops.h
@@ -138,9 +138,9 @@ static int glue(load_symbols, SZ)(struct elfhdr *ehdr, int fd, int must_swab) @@ -138,9 +138,9 @@ static int glue(load_symbols, SZ)(struct elfhdr *ehdr, int fd, int must_swab)
138 return -1; 138 return -1;
139 } 139 }
140 140
141 -int glue(load_elf, SZ)(int fd, int64_t virt_to_phys_addend,  
142 - int must_swab, uint64_t *pentry,  
143 - uint64_t *lowaddr, uint64_t *highaddr) 141 +static int glue(load_elf, SZ)(int fd, int64_t virt_to_phys_addend,
  142 + int must_swab, uint64_t *pentry,
  143 + uint64_t *lowaddr, uint64_t *highaddr)
144 { 144 {
145 struct elfhdr ehdr; 145 struct elfhdr ehdr;
146 struct elf_phdr *phdr = NULL, *ph; 146 struct elf_phdr *phdr = NULL, *ph;
hw/arm_sysctl.c
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 */ 8 */
9 9
10 #include "hw.h" 10 #include "hw.h"
11 -#include "arm-misc.h" 11 +#include "primecell.h"
12 #include "sysemu.h" 12 #include "sysemu.h"
13 13
14 #define LOCK_VALUE 0xa05f 14 #define LOCK_VALUE 0xa05f
hw/arm_timer.c
@@ -8,8 +8,8 @@ @@ -8,8 +8,8 @@
8 */ 8 */
9 9
10 #include "hw.h" 10 #include "hw.h"
11 -#include "arm-misc.h"  
12 #include "qemu-timer.h" 11 #include "qemu-timer.h"
  12 +#include "primecell.h"
13 13
14 /* Common timer implementation. */ 14 /* Common timer implementation. */
15 15
@@ -43,7 +43,7 @@ static void arm_timer_update(arm_timer_state *s) @@ -43,7 +43,7 @@ static void arm_timer_update(arm_timer_state *s)
43 } 43 }
44 } 44 }
45 45
46 -uint32_t arm_timer_read(void *opaque, target_phys_addr_t offset) 46 +static uint32_t arm_timer_read(void *opaque, target_phys_addr_t offset)
47 { 47 {
48 arm_timer_state *s = (arm_timer_state *)opaque; 48 arm_timer_state *s = (arm_timer_state *)opaque;
49 49
hw/gt64xxx.c
@@ -908,7 +908,7 @@ static void pci_gt64120_set_irq(qemu_irq *pic, int irq_num, int level) @@ -908,7 +908,7 @@ static void pci_gt64120_set_irq(qemu_irq *pic, int irq_num, int level)
908 } 908 }
909 909
910 910
911 -void gt64120_reset(void *opaque) 911 +static void gt64120_reset(void *opaque)
912 { 912 {
913 GT64120State *s = opaque; 913 GT64120State *s = opaque;
914 914
hw/i8259.c
@@ -178,7 +178,7 @@ void pic_update_irq(PicState2 *s) @@ -178,7 +178,7 @@ void pic_update_irq(PicState2 *s)
178 int64_t irq_time[16]; 178 int64_t irq_time[16];
179 #endif 179 #endif
180 180
181 -void i8259_set_irq(void *opaque, int irq, int level) 181 +static void i8259_set_irq(void *opaque, int irq, int level)
182 { 182 {
183 PicState2 *s = opaque; 183 PicState2 *s = opaque;
184 184
hw/ide.c
@@ -30,6 +30,7 @@ @@ -30,6 +30,7 @@
30 #include "block.h" 30 #include "block.h"
31 #include "qemu-timer.h" 31 #include "qemu-timer.h"
32 #include "sysemu.h" 32 #include "sysemu.h"
  33 +#include "ppc_mac.h"
33 34
34 /* debug IDE devices */ 35 /* debug IDE devices */
35 //#define DEBUG_IDE 36 //#define DEBUG_IDE
hw/mc146818rtc.c
@@ -390,7 +390,7 @@ void rtc_set_date(RTCState *s, const struct tm *tm) @@ -390,7 +390,7 @@ void rtc_set_date(RTCState *s, const struct tm *tm)
390 #define REG_IBM_CENTURY_BYTE 0x32 390 #define REG_IBM_CENTURY_BYTE 0x32
391 #define REG_IBM_PS2_CENTURY_BYTE 0x37 391 #define REG_IBM_PS2_CENTURY_BYTE 0x37
392 392
393 -void rtc_set_date_from_host(RTCState *s) 393 +static void rtc_set_date_from_host(RTCState *s)
394 { 394 {
395 time_t ti; 395 time_t ti;
396 struct tm *tm; 396 struct tm *tm;
@@ -498,22 +498,22 @@ RTCState *rtc_init(int base, qemu_irq irq) @@ -498,22 +498,22 @@ RTCState *rtc_init(int base, qemu_irq irq)
498 } 498 }
499 499
500 /* Memory mapped interface */ 500 /* Memory mapped interface */
501 -uint32_t cmos_mm_readb (void *opaque, target_phys_addr_t addr) 501 +static uint32_t cmos_mm_readb (void *opaque, target_phys_addr_t addr)
502 { 502 {
503 RTCState *s = opaque; 503 RTCState *s = opaque;
504 504
505 return cmos_ioport_read(s, (addr - s->base) >> s->it_shift) & 0xFF; 505 return cmos_ioport_read(s, (addr - s->base) >> s->it_shift) & 0xFF;
506 } 506 }
507 507
508 -void cmos_mm_writeb (void *opaque,  
509 - target_phys_addr_t addr, uint32_t value) 508 +static void cmos_mm_writeb (void *opaque,
  509 + target_phys_addr_t addr, uint32_t value)
510 { 510 {
511 RTCState *s = opaque; 511 RTCState *s = opaque;
512 512
513 cmos_ioport_write(s, (addr - s->base) >> s->it_shift, value & 0xFF); 513 cmos_ioport_write(s, (addr - s->base) >> s->it_shift, value & 0xFF);
514 } 514 }
515 515
516 -uint32_t cmos_mm_readw (void *opaque, target_phys_addr_t addr) 516 +static uint32_t cmos_mm_readw (void *opaque, target_phys_addr_t addr)
517 { 517 {
518 RTCState *s = opaque; 518 RTCState *s = opaque;
519 uint32_t val; 519 uint32_t val;
@@ -525,8 +525,8 @@ uint32_t cmos_mm_readw (void *opaque, target_phys_addr_t addr) @@ -525,8 +525,8 @@ uint32_t cmos_mm_readw (void *opaque, target_phys_addr_t addr)
525 return val; 525 return val;
526 } 526 }
527 527
528 -void cmos_mm_writew (void *opaque,  
529 - target_phys_addr_t addr, uint32_t value) 528 +static void cmos_mm_writew (void *opaque,
  529 + target_phys_addr_t addr, uint32_t value)
530 { 530 {
531 RTCState *s = opaque; 531 RTCState *s = opaque;
532 #ifdef TARGET_WORDS_BIGENDIAN 532 #ifdef TARGET_WORDS_BIGENDIAN
@@ -535,7 +535,7 @@ void cmos_mm_writew (void *opaque, @@ -535,7 +535,7 @@ void cmos_mm_writew (void *opaque,
535 cmos_ioport_write(s, (addr - s->base) >> s->it_shift, value & 0xFFFF); 535 cmos_ioport_write(s, (addr - s->base) >> s->it_shift, value & 0xFFFF);
536 } 536 }
537 537
538 -uint32_t cmos_mm_readl (void *opaque, target_phys_addr_t addr) 538 +static uint32_t cmos_mm_readl (void *opaque, target_phys_addr_t addr)
539 { 539 {
540 RTCState *s = opaque; 540 RTCState *s = opaque;
541 uint32_t val; 541 uint32_t val;
@@ -547,8 +547,8 @@ uint32_t cmos_mm_readl (void *opaque, target_phys_addr_t addr) @@ -547,8 +547,8 @@ uint32_t cmos_mm_readl (void *opaque, target_phys_addr_t addr)
547 return val; 547 return val;
548 } 548 }
549 549
550 -void cmos_mm_writel (void *opaque,  
551 - target_phys_addr_t addr, uint32_t value) 550 +static void cmos_mm_writel (void *opaque,
  551 + target_phys_addr_t addr, uint32_t value)
552 { 552 {
553 RTCState *s = opaque; 553 RTCState *s = opaque;
554 #ifdef TARGET_WORDS_BIGENDIAN 554 #ifdef TARGET_WORDS_BIGENDIAN
hw/mcf_fec.c
@@ -251,7 +251,7 @@ static uint32_t mcf_fec_read(void *opaque, target_phys_addr_t addr) @@ -251,7 +251,7 @@ static uint32_t mcf_fec_read(void *opaque, target_phys_addr_t addr)
251 } 251 }
252 } 252 }
253 253
254 -void mcf_fec_write(void *opaque, target_phys_addr_t addr, uint32_t value) 254 +static void mcf_fec_write(void *opaque, target_phys_addr_t addr, uint32_t value)
255 { 255 {
256 mcf_fec_state *s = (mcf_fec_state *)opaque; 256 mcf_fec_state *s = (mcf_fec_state *)opaque;
257 switch (addr & 0x3ff) { 257 switch (addr & 0x3ff) {
hw/mips_malta.c
@@ -398,7 +398,7 @@ static CPUWriteMemoryFunc *malta_fpga_write[] = { @@ -398,7 +398,7 @@ static CPUWriteMemoryFunc *malta_fpga_write[] = {
398 malta_fpga_writel 398 malta_fpga_writel
399 }; 399 };
400 400
401 -void malta_fpga_reset(void *opaque) 401 +static void malta_fpga_reset(void *opaque)
402 { 402 {
403 MaltaFPGAState *s = opaque; 403 MaltaFPGAState *s = opaque;
404 404
@@ -415,7 +415,7 @@ void malta_fpga_reset(void *opaque) @@ -415,7 +415,7 @@ void malta_fpga_reset(void *opaque)
415 malta_fpga_update_display(s); 415 malta_fpga_update_display(s);
416 } 416 }
417 417
418 -MaltaFPGAState *malta_fpga_init(target_phys_addr_t base, CPUState *env) 418 +static MaltaFPGAState *malta_fpga_init(target_phys_addr_t base, CPUState *env)
419 { 419 {
420 MaltaFPGAState *s; 420 MaltaFPGAState *s;
421 CharDriverState *uart_chr; 421 CharDriverState *uart_chr;
hw/ne2000.c
@@ -23,6 +23,7 @@ @@ -23,6 +23,7 @@
23 */ 23 */
24 #include "hw.h" 24 #include "hw.h"
25 #include "pci.h" 25 #include "pci.h"
  26 +#include "pc.h"
26 #include "net.h" 27 #include "net.h"
27 28
28 /* debug NE2000 card */ 29 /* debug NE2000 card */
hw/nvram.h
@@ -37,5 +37,6 @@ void m48t59_toggle_lock (void *private, int lock); @@ -37,5 +37,6 @@ void m48t59_toggle_lock (void *private, int lock);
37 m48t59_t *m48t59_init (qemu_irq IRQ, target_phys_addr_t mem_base, 37 m48t59_t *m48t59_init (qemu_irq IRQ, target_phys_addr_t mem_base,
38 uint32_t io_base, uint16_t size, 38 uint32_t io_base, uint16_t size,
39 int type); 39 int type);
  40 +void m48t59_set_addr (void *opaque, uint32_t addr);
40 41
41 #endif /* !NVRAM_H */ 42 #endif /* !NVRAM_H */
hw/omap.c
@@ -3041,7 +3041,7 @@ static CPUWriteMemoryFunc *omap_mpuio_writefn[] = { @@ -3041,7 +3041,7 @@ static CPUWriteMemoryFunc *omap_mpuio_writefn[] = {
3041 omap_badwidth_write16, 3041 omap_badwidth_write16,
3042 }; 3042 };
3043 3043
3044 -void omap_mpuio_reset(struct omap_mpuio_s *s) 3044 +static void omap_mpuio_reset(struct omap_mpuio_s *s)
3045 { 3045 {
3046 s->inputs = 0; 3046 s->inputs = 0;
3047 s->outputs = 0; 3047 s->outputs = 0;
@@ -3257,7 +3257,7 @@ static CPUWriteMemoryFunc *omap_gpio_writefn[] = { @@ -3257,7 +3257,7 @@ static CPUWriteMemoryFunc *omap_gpio_writefn[] = {
3257 omap_badwidth_write16, 3257 omap_badwidth_write16,
3258 }; 3258 };
3259 3259
3260 -void omap_gpio_reset(struct omap_gpio_s *s) 3260 +static void omap_gpio_reset(struct omap_gpio_s *s)
3261 { 3261 {
3262 s->inputs = 0; 3262 s->inputs = 0;
3263 s->outputs = ~0; 3263 s->outputs = ~0;
@@ -3429,7 +3429,7 @@ static CPUWriteMemoryFunc *omap_uwire_writefn[] = { @@ -3429,7 +3429,7 @@ static CPUWriteMemoryFunc *omap_uwire_writefn[] = {
3429 omap_badwidth_write16, 3429 omap_badwidth_write16,
3430 }; 3430 };
3431 3431
3432 -void omap_uwire_reset(struct omap_uwire_s *s) 3432 +static void omap_uwire_reset(struct omap_uwire_s *s)
3433 { 3433 {
3434 s->control = 0; 3434 s->control = 0;
3435 s->setup[0] = 0; 3435 s->setup[0] = 0;
@@ -3470,7 +3470,7 @@ void omap_uwire_attach(struct omap_uwire_s *s, @@ -3470,7 +3470,7 @@ void omap_uwire_attach(struct omap_uwire_s *s,
3470 } 3470 }
3471 3471
3472 /* Pseudonoise Pulse-Width Light Modulator */ 3472 /* Pseudonoise Pulse-Width Light Modulator */
3473 -void omap_pwl_update(struct omap_mpu_state_s *s) 3473 +static void omap_pwl_update(struct omap_mpu_state_s *s)
3474 { 3474 {
3475 int output = (s->pwl.clk && s->pwl.enable) ? s->pwl.level : 0; 3475 int output = (s->pwl.clk && s->pwl.enable) ? s->pwl.level : 0;
3476 3476
@@ -3528,7 +3528,7 @@ static CPUWriteMemoryFunc *omap_pwl_writefn[] = { @@ -3528,7 +3528,7 @@ static CPUWriteMemoryFunc *omap_pwl_writefn[] = {
3528 omap_badwidth_write8, 3528 omap_badwidth_write8,
3529 }; 3529 };
3530 3530
3531 -void omap_pwl_reset(struct omap_mpu_state_s *s) 3531 +static void omap_pwl_reset(struct omap_mpu_state_s *s)
3532 { 3532 {
3533 s->pwl.output = 0; 3533 s->pwl.output = 0;
3534 s->pwl.level = 0; 3534 s->pwl.level = 0;
@@ -3632,7 +3632,7 @@ static CPUWriteMemoryFunc *omap_pwt_writefn[] = { @@ -3632,7 +3632,7 @@ static CPUWriteMemoryFunc *omap_pwt_writefn[] = {
3632 omap_badwidth_write8, 3632 omap_badwidth_write8,
3633 }; 3633 };
3634 3634
3635 -void omap_pwt_reset(struct omap_mpu_state_s *s) 3635 +static void omap_pwt_reset(struct omap_mpu_state_s *s)
3636 { 3636 {
3637 s->pwt.frc = 0; 3637 s->pwt.frc = 0;
3638 s->pwt.vrc = 0; 3638 s->pwt.vrc = 0;
@@ -4037,7 +4037,7 @@ static void omap_rtc_tick(void *opaque) @@ -4037,7 +4037,7 @@ static void omap_rtc_tick(void *opaque)
4037 qemu_mod_timer(s->clk, s->tick); 4037 qemu_mod_timer(s->clk, s->tick);
4038 } 4038 }
4039 4039
4040 -void omap_rtc_reset(struct omap_rtc_s *s) 4040 +static void omap_rtc_reset(struct omap_rtc_s *s)
4041 { 4041 {
4042 s->interrupts = 0; 4042 s->interrupts = 0;
4043 s->comp_reg = 0; 4043 s->comp_reg = 0;
@@ -4509,14 +4509,14 @@ struct omap_mcbsp_s *omap_mcbsp_init(target_phys_addr_t base, @@ -4509,14 +4509,14 @@ struct omap_mcbsp_s *omap_mcbsp_init(target_phys_addr_t base,
4509 return s; 4509 return s;
4510 } 4510 }
4511 4511
4512 -void omap_mcbsp_i2s_swallow(void *opaque, int line, int level) 4512 +static void omap_mcbsp_i2s_swallow(void *opaque, int line, int level)
4513 { 4513 {
4514 struct omap_mcbsp_s *s = (struct omap_mcbsp_s *) opaque; 4514 struct omap_mcbsp_s *s = (struct omap_mcbsp_s *) opaque;
4515 4515
4516 omap_mcbsp_rx_start(s); 4516 omap_mcbsp_rx_start(s);
4517 } 4517 }
4518 4518
4519 -void omap_mcbsp_i2s_start(void *opaque, int line, int level) 4519 +static void omap_mcbsp_i2s_start(void *opaque, int line, int level)
4520 { 4520 {
4521 struct omap_mcbsp_s *s = (struct omap_mcbsp_s *) opaque; 4521 struct omap_mcbsp_s *s = (struct omap_mcbsp_s *) opaque;
4522 4522
hw/omap.h
@@ -662,6 +662,9 @@ struct omap_mpu_state_s { @@ -662,6 +662,9 @@ struct omap_mpu_state_s {
662 # error TARGET_PHYS_ADDR_BITS undefined 662 # error TARGET_PHYS_ADDR_BITS undefined
663 # endif 663 # endif
664 664
  665 +uint32_t omap_badwidth_read8(void *opaque, target_phys_addr_t addr);
  666 +void omap_badwidth_write8(void *opaque, target_phys_addr_t addr,
  667 + uint32_t value);
665 uint32_t omap_badwidth_read16(void *opaque, target_phys_addr_t addr); 668 uint32_t omap_badwidth_read16(void *opaque, target_phys_addr_t addr);
666 void omap_badwidth_write16(void *opaque, target_phys_addr_t addr, 669 void omap_badwidth_write16(void *opaque, target_phys_addr_t addr,
667 uint32_t value); 670 uint32_t value);
hw/omap_lcdc.c
@@ -114,7 +114,7 @@ static draw_line_func *draw_line_table2[33] = { @@ -114,7 +114,7 @@ static draw_line_func *draw_line_table2[33] = {
114 [32] = draw_line16_32, 114 [32] = draw_line16_32,
115 }; 115 };
116 116
117 -void omap_update_display(void *opaque) 117 +static void omap_update_display(void *opaque)
118 { 118 {
119 struct omap_lcd_panel_s *omap_lcd = (struct omap_lcd_panel_s *) opaque; 119 struct omap_lcd_panel_s *omap_lcd = (struct omap_lcd_panel_s *) opaque;
120 draw_line_func *draw_line; 120 draw_line_func *draw_line;
@@ -289,7 +289,7 @@ static int ppm_save(const char *filename, uint8_t *data, @@ -289,7 +289,7 @@ static int ppm_save(const char *filename, uint8_t *data,
289 return 0; 289 return 0;
290 } 290 }
291 291
292 -void omap_screen_dump(void *opaque, const char *filename) { 292 +static void omap_screen_dump(void *opaque, const char *filename) {
293 struct omap_lcd_panel_s *omap_lcd = opaque; 293 struct omap_lcd_panel_s *omap_lcd = opaque;
294 omap_update_display(opaque); 294 omap_update_display(opaque);
295 if (omap_lcd && omap_lcd->state->data) 295 if (omap_lcd && omap_lcd->state->data)
@@ -298,12 +298,12 @@ void omap_screen_dump(void *opaque, const char *filename) { @@ -298,12 +298,12 @@ void omap_screen_dump(void *opaque, const char *filename) {
298 omap_lcd->state->linesize); 298 omap_lcd->state->linesize);
299 } 299 }
300 300
301 -void omap_invalidate_display(void *opaque) { 301 +static void omap_invalidate_display(void *opaque) {
302 struct omap_lcd_panel_s *omap_lcd = opaque; 302 struct omap_lcd_panel_s *omap_lcd = opaque;
303 omap_lcd->invalidate = 1; 303 omap_lcd->invalidate = 1;
304 } 304 }
305 305
306 -void omap_lcd_update(struct omap_lcd_panel_s *s) { 306 +static void omap_lcd_update(struct omap_lcd_panel_s *s) {
307 if (!s->enable) { 307 if (!s->enable) {
308 s->dma->current_frame = -1; 308 s->dma->current_frame = -1;
309 s->sync_error = 0; 309 s->sync_error = 0;
hw/parallel.c
@@ -458,45 +458,45 @@ ParallelState *parallel_init(int base, qemu_irq irq, CharDriverState *chr) @@ -458,45 +458,45 @@ ParallelState *parallel_init(int base, qemu_irq irq, CharDriverState *chr)
458 } 458 }
459 459
460 /* Memory mapped interface */ 460 /* Memory mapped interface */
461 -uint32_t parallel_mm_readb (void *opaque, target_phys_addr_t addr) 461 +static uint32_t parallel_mm_readb (void *opaque, target_phys_addr_t addr)
462 { 462 {
463 ParallelState *s = opaque; 463 ParallelState *s = opaque;
464 464
465 return parallel_ioport_read_sw(s, (addr - s->base) >> s->it_shift) & 0xFF; 465 return parallel_ioport_read_sw(s, (addr - s->base) >> s->it_shift) & 0xFF;
466 } 466 }
467 467
468 -void parallel_mm_writeb (void *opaque,  
469 - target_phys_addr_t addr, uint32_t value) 468 +static void parallel_mm_writeb (void *opaque,
  469 + target_phys_addr_t addr, uint32_t value)
470 { 470 {
471 ParallelState *s = opaque; 471 ParallelState *s = opaque;
472 472
473 parallel_ioport_write_sw(s, (addr - s->base) >> s->it_shift, value & 0xFF); 473 parallel_ioport_write_sw(s, (addr - s->base) >> s->it_shift, value & 0xFF);
474 } 474 }
475 475
476 -uint32_t parallel_mm_readw (void *opaque, target_phys_addr_t addr) 476 +static uint32_t parallel_mm_readw (void *opaque, target_phys_addr_t addr)
477 { 477 {
478 ParallelState *s = opaque; 478 ParallelState *s = opaque;
479 479
480 return parallel_ioport_read_sw(s, (addr - s->base) >> s->it_shift) & 0xFFFF; 480 return parallel_ioport_read_sw(s, (addr - s->base) >> s->it_shift) & 0xFFFF;
481 } 481 }
482 482
483 -void parallel_mm_writew (void *opaque,  
484 - target_phys_addr_t addr, uint32_t value) 483 +static void parallel_mm_writew (void *opaque,
  484 + target_phys_addr_t addr, uint32_t value)
485 { 485 {
486 ParallelState *s = opaque; 486 ParallelState *s = opaque;
487 487
488 parallel_ioport_write_sw(s, (addr - s->base) >> s->it_shift, value & 0xFFFF); 488 parallel_ioport_write_sw(s, (addr - s->base) >> s->it_shift, value & 0xFFFF);
489 } 489 }
490 490
491 -uint32_t parallel_mm_readl (void *opaque, target_phys_addr_t addr) 491 +static uint32_t parallel_mm_readl (void *opaque, target_phys_addr_t addr)
492 { 492 {
493 ParallelState *s = opaque; 493 ParallelState *s = opaque;
494 494
495 return parallel_ioport_read_sw(s, (addr - s->base) >> s->it_shift); 495 return parallel_ioport_read_sw(s, (addr - s->base) >> s->it_shift);
496 } 496 }
497 497
498 -void parallel_mm_writel (void *opaque,  
499 - target_phys_addr_t addr, uint32_t value) 498 +static void parallel_mm_writel (void *opaque,
  499 + target_phys_addr_t addr, uint32_t value)
500 { 500 {
501 ParallelState *s = opaque; 501 ParallelState *s = opaque;
502 502
@@ -317,7 +317,7 @@ static uint32_t ioport92_read(void *opaque, uint32_t addr) @@ -317,7 +317,7 @@ static uint32_t ioport92_read(void *opaque, uint32_t addr)
317 /***********************************************************/ 317 /***********************************************************/
318 /* Bochs BIOS debug ports */ 318 /* Bochs BIOS debug ports */
319 319
320 -void bochs_bios_write(void *opaque, uint32_t addr, uint32_t val) 320 +static void bochs_bios_write(void *opaque, uint32_t addr, uint32_t val)
321 { 321 {
322 static const char shutdown_str[8] = "Shutdown"; 322 static const char shutdown_str[8] = "Shutdown";
323 static int shutdown_index = 0; 323 static int shutdown_index = 0;
@@ -361,7 +361,7 @@ void bochs_bios_write(void *opaque, uint32_t addr, uint32_t val) @@ -361,7 +361,7 @@ void bochs_bios_write(void *opaque, uint32_t addr, uint32_t val)
361 } 361 }
362 } 362 }
363 363
364 -void bochs_bios_init(void) 364 +static void bochs_bios_init(void)
365 { 365 {
366 register_ioport_write(0x400, 1, 2, bochs_bios_write, NULL); 366 register_ioport_write(0x400, 1, 2, bochs_bios_write, NULL);
367 register_ioport_write(0x401, 1, 2, bochs_bios_write, NULL); 367 register_ioport_write(0x401, 1, 2, bochs_bios_write, NULL);
@@ -431,8 +431,8 @@ static void generate_bootsect(uint32_t gpr[8], uint16_t segs[6], uint16_t ip) @@ -431,8 +431,8 @@ static void generate_bootsect(uint32_t gpr[8], uint16_t segs[6], uint16_t ip)
431 bdrv_set_boot_sector(bs_table[0], bootsect, sizeof(bootsect)); 431 bdrv_set_boot_sector(bs_table[0], bootsect, sizeof(bootsect));
432 } 432 }
433 433
434 -int load_kernel(const char *filename, uint8_t *addr,  
435 - uint8_t *real_addr) 434 +static int load_kernel(const char *filename, uint8_t *addr,
  435 + uint8_t *real_addr)
436 { 436 {
437 int fd, size; 437 int fd, size;
438 int setup_sects; 438 int setup_sects;
hw/pci.c
@@ -65,7 +65,7 @@ PCIBus *pci_register_bus(pci_set_irq_fn set_irq, pci_map_irq_fn map_irq, @@ -65,7 +65,7 @@ PCIBus *pci_register_bus(pci_set_irq_fn set_irq, pci_map_irq_fn map_irq,
65 return bus; 65 return bus;
66 } 66 }
67 67
68 -PCIBus *pci_register_secondary_bus(PCIDevice *dev, pci_map_irq_fn map_irq) 68 +static PCIBus *pci_register_secondary_bus(PCIDevice *dev, pci_map_irq_fn map_irq)
69 { 69 {
70 PCIBus *bus; 70 PCIBus *bus;
71 bus = qemu_mallocz(sizeof(PCIBus)); 71 bus = qemu_mallocz(sizeof(PCIBus));
@@ -159,7 +159,7 @@ void pci_register_io_region(PCIDevice *pci_dev, int region_num, @@ -159,7 +159,7 @@ void pci_register_io_region(PCIDevice *pci_dev, int region_num,
159 *(uint32_t *)(pci_dev->config + addr) = cpu_to_le32(type); 159 *(uint32_t *)(pci_dev->config + addr) = cpu_to_le32(type);
160 } 160 }
161 161
162 -target_phys_addr_t pci_to_cpu_addr(target_phys_addr_t addr) 162 +static target_phys_addr_t pci_to_cpu_addr(target_phys_addr_t addr)
163 { 163 {
164 return addr + pci_mem_base; 164 return addr + pci_mem_base;
165 } 165 }
@@ -606,7 +606,7 @@ typedef struct { @@ -606,7 +606,7 @@ typedef struct {
606 PCIBus *bus; 606 PCIBus *bus;
607 } PCIBridge; 607 } PCIBridge;
608 608
609 -void pci_bridge_write_config(PCIDevice *d, 609 +static void pci_bridge_write_config(PCIDevice *d,
610 uint32_t address, uint32_t val, int len) 610 uint32_t address, uint32_t val, int len)
611 { 611 {
612 PCIBridge *s = (PCIBridge *)d; 612 PCIBridge *s = (PCIBridge *)d;
hw/pckbd.c
@@ -290,7 +290,7 @@ static uint32_t kbd_read_data(void *opaque, uint32_t addr) @@ -290,7 +290,7 @@ static uint32_t kbd_read_data(void *opaque, uint32_t addr)
290 return ps2_read_data(s->kbd); 290 return ps2_read_data(s->kbd);
291 } 291 }
292 292
293 -void kbd_write_data(void *opaque, uint32_t addr, uint32_t val) 293 +static void kbd_write_data(void *opaque, uint32_t addr, uint32_t val)
294 { 294 {
295 KBDState *s = opaque; 295 KBDState *s = opaque;
296 296
@@ -385,7 +385,7 @@ void i8042_init(qemu_irq kbd_irq, qemu_irq mouse_irq, uint32_t io_base) @@ -385,7 +385,7 @@ void i8042_init(qemu_irq kbd_irq, qemu_irq mouse_irq, uint32_t io_base)
385 } 385 }
386 386
387 /* Memory mapped interface */ 387 /* Memory mapped interface */
388 -uint32_t kbd_mm_readb (void *opaque, target_phys_addr_t addr) 388 +static uint32_t kbd_mm_readb (void *opaque, target_phys_addr_t addr)
389 { 389 {
390 KBDState *s = opaque; 390 KBDState *s = opaque;
391 391
@@ -399,7 +399,7 @@ uint32_t kbd_mm_readb (void *opaque, target_phys_addr_t addr) @@ -399,7 +399,7 @@ uint32_t kbd_mm_readb (void *opaque, target_phys_addr_t addr)
399 } 399 }
400 } 400 }
401 401
402 -void kbd_mm_writeb (void *opaque, target_phys_addr_t addr, uint32_t value) 402 +static void kbd_mm_writeb (void *opaque, target_phys_addr_t addr, uint32_t value)
403 { 403 {
404 KBDState *s = opaque; 404 KBDState *s = opaque;
405 405
hw/piix_pci.c
@@ -314,7 +314,7 @@ static int piix_load(QEMUFile* f, void *opaque, int version_id) @@ -314,7 +314,7 @@ static int piix_load(QEMUFile* f, void *opaque, int version_id)
314 return pci_device_load(d, f); 314 return pci_device_load(d, f);
315 } 315 }
316 316
317 -int piix_init(PCIBus *bus, int devfn) 317 +static int piix_init(PCIBus *bus, int devfn)
318 { 318 {
319 PCIDevice *d; 319 PCIDevice *d;
320 uint8_t *pci_conf; 320 uint8_t *pci_conf;
hw/pl061.c
@@ -209,7 +209,7 @@ static void pl061_reset(pl061_state *s) @@ -209,7 +209,7 @@ static void pl061_reset(pl061_state *s)
209 s->cr = 0xff; 209 s->cr = 0xff;
210 } 210 }
211 211
212 -void pl061_set_irq(void * opaque, int irq, int level) 212 +static void pl061_set_irq(void * opaque, int irq, int level)
213 { 213 {
214 pl061_state *s = (pl061_state *)opaque; 214 pl061_state *s = (pl061_state *)opaque;
215 uint8_t mask; 215 uint8_t mask;
hw/pl190.c
@@ -216,7 +216,7 @@ static CPUWriteMemoryFunc *pl190_writefn[] = { @@ -216,7 +216,7 @@ static CPUWriteMemoryFunc *pl190_writefn[] = {
216 pl190_write 216 pl190_write
217 }; 217 };
218 218
219 -void pl190_reset(pl190_state *s) 219 +static void pl190_reset(pl190_state *s)
220 { 220 {
221 int i; 221 int i;
222 222
hw/pxa2xx_lcd.c
@@ -882,7 +882,7 @@ static void pxa2xx_screen_dump(void *opaque, const char *filename) @@ -882,7 +882,7 @@ static void pxa2xx_screen_dump(void *opaque, const char *filename)
882 /* TODO */ 882 /* TODO */
883 } 883 }
884 884
885 -void pxa2xx_lcdc_orientation(void *opaque, int angle) 885 +static void pxa2xx_lcdc_orientation(void *opaque, int angle)
886 { 886 {
887 struct pxa2xx_lcdc_s *s = (struct pxa2xx_lcdc_s *) opaque; 887 struct pxa2xx_lcdc_s *s = (struct pxa2xx_lcdc_s *) opaque;
888 888
hw/pxa2xx_pcmcia.c
@@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@
9 9
10 #include "hw.h" 10 #include "hw.h"
11 #include "pcmcia.h" 11 #include "pcmcia.h"
  12 +#include "pxa.h"
12 13
13 struct pxa2xx_pcmcia_s { 14 struct pxa2xx_pcmcia_s {
14 struct pcmcia_socket_s slot; 15 struct pcmcia_socket_s slot;
hw/realview_gic.c
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 */ 8 */
9 9
10 #include "hw.h" 10 #include "hw.h"
11 -#include "arm-misc.h" 11 +#include "primecell.h"
12 12
13 #define GIC_NIRQ 96 13 #define GIC_NIRQ 96
14 #define NCPU 1 14 #define NCPU 1
hw/rtl8139.c
@@ -497,7 +497,7 @@ typedef struct RTL8139State { @@ -497,7 +497,7 @@ typedef struct RTL8139State {
497 497
498 } RTL8139State; 498 } RTL8139State;
499 499
500 -void prom9346_decode_command(EEprom9346 *eeprom, uint8_t command) 500 +static void prom9346_decode_command(EEprom9346 *eeprom, uint8_t command)
501 { 501 {
502 DEBUG_PRINT(("RTL8139: eeprom command 0x%02x\n", command)); 502 DEBUG_PRINT(("RTL8139: eeprom command 0x%02x\n", command));
503 503
@@ -543,7 +543,7 @@ void prom9346_decode_command(EEprom9346 *eeprom, uint8_t command) @@ -543,7 +543,7 @@ void prom9346_decode_command(EEprom9346 *eeprom, uint8_t command)
543 } 543 }
544 } 544 }
545 545
546 -void prom9346_shift_clock(EEprom9346 *eeprom) 546 +static void prom9346_shift_clock(EEprom9346 *eeprom)
547 { 547 {
548 int bit = eeprom->eedi?1:0; 548 int bit = eeprom->eedi?1:0;
549 549
@@ -635,7 +635,7 @@ void prom9346_shift_clock(EEprom9346 *eeprom) @@ -635,7 +635,7 @@ void prom9346_shift_clock(EEprom9346 *eeprom)
635 } 635 }
636 } 636 }
637 637
638 -int prom9346_get_wire(RTL8139State *s) 638 +static int prom9346_get_wire(RTL8139State *s)
639 { 639 {
640 EEprom9346 *eeprom = &s->eeprom; 640 EEprom9346 *eeprom = &s->eeprom;
641 if (!eeprom->eecs) 641 if (!eeprom->eecs)
@@ -644,7 +644,8 @@ int prom9346_get_wire(RTL8139State *s) @@ -644,7 +644,8 @@ int prom9346_get_wire(RTL8139State *s)
644 return eeprom->eedo; 644 return eeprom->eedo;
645 } 645 }
646 646
647 -void prom9346_set_wire(RTL8139State *s, int eecs, int eesk, int eedi) 647 +/* FIXME: This should be merged into/replaced by eeprom93xx.c. */
  648 +static void prom9346_set_wire(RTL8139State *s, int eecs, int eesk, int eedi)
648 { 649 {
649 EEprom9346 *eeprom = &s->eeprom; 650 EEprom9346 *eeprom = &s->eeprom;
650 uint8_t old_eecs = eeprom->eecs; 651 uint8_t old_eecs = eeprom->eecs;
@@ -1448,7 +1449,7 @@ static uint32_t rtl8139_IntrMitigate_read(RTL8139State *s) @@ -1448,7 +1449,7 @@ static uint32_t rtl8139_IntrMitigate_read(RTL8139State *s)
1448 return ret; 1449 return ret;
1449 } 1450 }
1450 1451
1451 -int rtl8139_config_writeable(RTL8139State *s) 1452 +static int rtl8139_config_writeable(RTL8139State *s)
1452 { 1453 {
1453 if (s->Cfg9346 & Cfg9346_Unlock) 1454 if (s->Cfg9346 & Cfg9346_Unlock)
1454 { 1455 {
@@ -308,8 +308,8 @@ static int sd_req_crc_validate(struct sd_request_s *req) @@ -308,8 +308,8 @@ static int sd_req_crc_validate(struct sd_request_s *req)
308 return sd_crc7(buffer, 5) != req->crc; /* TODO */ 308 return sd_crc7(buffer, 5) != req->crc; /* TODO */
309 } 309 }
310 310
311 -void sd_response_r1_make(SDState *sd,  
312 - uint8_t *response, uint32_t last_status) 311 +static void sd_response_r1_make(SDState *sd,
  312 + uint8_t *response, uint32_t last_status)
313 { 313 {
314 uint32_t mask = CARD_STATUS_B ^ ILLEGAL_COMMAND; 314 uint32_t mask = CARD_STATUS_B ^ ILLEGAL_COMMAND;
315 uint32_t status; 315 uint32_t status;
@@ -323,7 +323,7 @@ void sd_response_r1_make(SDState *sd, @@ -323,7 +323,7 @@ void sd_response_r1_make(SDState *sd,
323 response[3] = (status >> 0) & 0xff; 323 response[3] = (status >> 0) & 0xff;
324 } 324 }
325 325
326 -void sd_response_r3_make(SDState *sd, uint8_t *response) 326 +static void sd_response_r3_make(SDState *sd, uint8_t *response)
327 { 327 {
328 response[0] = (sd->ocr >> 24) & 0xff; 328 response[0] = (sd->ocr >> 24) & 0xff;
329 response[1] = (sd->ocr >> 16) & 0xff; 329 response[1] = (sd->ocr >> 16) & 0xff;
@@ -331,7 +331,7 @@ void sd_response_r3_make(SDState *sd, uint8_t *response) @@ -331,7 +331,7 @@ void sd_response_r3_make(SDState *sd, uint8_t *response)
331 response[3] = (sd->ocr >> 0) & 0xff; 331 response[3] = (sd->ocr >> 0) & 0xff;
332 } 332 }
333 333
334 -void sd_response_r6_make(SDState *sd, uint8_t *response) 334 +static void sd_response_r6_make(SDState *sd, uint8_t *response)
335 { 335 {
336 uint16_t arg; 336 uint16_t arg;
337 uint16_t status; 337 uint16_t status;
hw/sh_serial.c
@@ -252,14 +252,14 @@ static void sh_serial_event(void *opaque, int event) @@ -252,14 +252,14 @@ static void sh_serial_event(void *opaque, int event)
252 sh_serial_receive_break(s); 252 sh_serial_receive_break(s);
253 } 253 }
254 254
255 -uint32_t sh_serial_read (void *opaque, target_phys_addr_t addr) 255 +static uint32_t sh_serial_read (void *opaque, target_phys_addr_t addr)
256 { 256 {
257 sh_serial_state *s = opaque; 257 sh_serial_state *s = opaque;
258 return sh_serial_ioport_read(s, addr - s->base); 258 return sh_serial_ioport_read(s, addr - s->base);
259 } 259 }
260 260
261 -void sh_serial_write (void *opaque,  
262 - target_phys_addr_t addr, uint32_t value) 261 +static void sh_serial_write (void *opaque,
  262 + target_phys_addr_t addr, uint32_t value)
263 { 263 {
264 sh_serial_state *s = opaque; 264 sh_serial_state *s = opaque;
265 sh_serial_ioport_write(s, addr - s->base, value); 265 sh_serial_ioport_write(s, addr - s->base, value);
hw/sh_timer.c
@@ -52,7 +52,7 @@ static void sh_timer_update(sh_timer_state *s) @@ -52,7 +52,7 @@ static void sh_timer_update(sh_timer_state *s)
52 #endif 52 #endif
53 } 53 }
54 54
55 -uint32_t sh_timer_read(void *opaque, target_phys_addr_t offset) 55 +static uint32_t sh_timer_read(void *opaque, target_phys_addr_t offset)
56 { 56 {
57 sh_timer_state *s = (sh_timer_state *)opaque; 57 sh_timer_state *s = (sh_timer_state *)opaque;
58 58
hw/smbus.c
@@ -61,7 +61,7 @@ static void smbus_do_write(SMBusDevice *dev) @@ -61,7 +61,7 @@ static void smbus_do_write(SMBusDevice *dev)
61 } 61 }
62 } 62 }
63 63
64 -void smbus_i2c_event(i2c_slave *s, enum i2c_event event) 64 +static void smbus_i2c_event(i2c_slave *s, enum i2c_event event)
65 { 65 {
66 SMBusDevice *dev = (SMBusDevice *)s; 66 SMBusDevice *dev = (SMBusDevice *)s;
67 switch (event) { 67 switch (event) {
hw/stellaris.c
@@ -521,7 +521,7 @@ static CPUWriteMemoryFunc *ssys_writefn[] = { @@ -521,7 +521,7 @@ static CPUWriteMemoryFunc *ssys_writefn[] = {
521 ssys_write 521 ssys_write
522 }; 522 };
523 523
524 -void ssys_reset(void *opaque) 524 +static void ssys_reset(void *opaque)
525 { 525 {
526 ssys_state *s = (ssys_state *)opaque; 526 ssys_state *s = (ssys_state *)opaque;
527 527
hw/usb-ohci.c
@@ -31,6 +31,7 @@ @@ -31,6 +31,7 @@
31 #include "qemu-timer.h" 31 #include "qemu-timer.h"
32 #include "usb.h" 32 #include "usb.h"
33 #include "pci.h" 33 #include "pci.h"
  34 +#include "pxa.h"
34 35
35 //#define DEBUG_OHCI 36 //#define DEBUG_OHCI
36 /* Dump packet contents. */ 37 /* Dump packet contents. */
hw/wm8750.c
@@ -124,7 +124,7 @@ static const struct wm_rate_s wm_rate_table[] = { @@ -124,7 +124,7 @@ static const struct wm_rate_s wm_rate_table[] = {
124 { 192, 88200, 128, 88200 }, /* SR: 11111 */ 124 { 192, 88200, 128, 88200 }, /* SR: 11111 */
125 }; 125 };
126 126
127 -void wm8750_set_format(struct wm8750_s *s) 127 +static void wm8750_set_format(struct wm8750_s *s)
128 { 128 {
129 int i; 129 int i;
130 audsettings_t in_fmt; 130 audsettings_t in_fmt;
@@ -194,7 +194,7 @@ void wm8750_set_format(struct wm8750_s *s) @@ -194,7 +194,7 @@ void wm8750_set_format(struct wm8750_s *s)
194 AUD_set_active_out(*s->out[0], 1); 194 AUD_set_active_out(*s->out[0], 1);
195 } 195 }
196 196
197 -void inline wm8750_mask_update(struct wm8750_s *s) 197 +static void inline wm8750_mask_update(struct wm8750_s *s)
198 { 198 {
199 #define R_ONLY 0x0000ffff 199 #define R_ONLY 0x0000ffff
200 #define L_ONLY 0xffff0000 200 #define L_ONLY 0xffff0000
@@ -596,7 +596,7 @@ i2c_slave *wm8750_init(i2c_bus *bus, AudioState *audio) @@ -596,7 +596,7 @@ i2c_slave *wm8750_init(i2c_bus *bus, AudioState *audio)
596 return &s->i2c; 596 return &s->i2c;
597 } 597 }
598 598
599 -void wm8750_fini(i2c_slave *i2c) 599 +static void wm8750_fini(i2c_slave *i2c)
600 { 600 {
601 struct wm8750_s *s = (struct wm8750_s *) i2c; 601 struct wm8750_s *s = (struct wm8750_s *) i2c;
602 wm8750_reset(&s->i2c); 602 wm8750_reset(&s->i2c);
i386-dis.c
@@ -1838,29 +1838,6 @@ static char close_char; @@ -1838,29 +1838,6 @@ static char close_char;
1838 static char separator_char; 1838 static char separator_char;
1839 static char scale_char; 1839 static char scale_char;
1840 1840
1841 -/* Here for backwards compatibility. When gdb stops using  
1842 - print_insn_i386_att and print_insn_i386_intel these functions can  
1843 - disappear, and print_insn_i386 be merged into print_insn. */  
1844 -int  
1845 -print_insn_i386_att (pc, info)  
1846 - bfd_vma pc;  
1847 - disassemble_info *info;  
1848 -{  
1849 - intel_syntax = 0;  
1850 -  
1851 - return print_insn (pc, info);  
1852 -}  
1853 -  
1854 -int  
1855 -print_insn_i386_intel (pc, info)  
1856 - bfd_vma pc;  
1857 - disassemble_info *info;  
1858 -{  
1859 - intel_syntax = 1;  
1860 -  
1861 - return print_insn (pc, info);  
1862 -}  
1863 -  
1864 int 1841 int
1865 print_insn_i386 (pc, info) 1842 print_insn_i386 (pc, info)
1866 bfd_vma pc; 1843 bfd_vma pc;
loader.c
@@ -23,6 +23,7 @@ @@ -23,6 +23,7 @@
23 */ 23 */
24 #include "qemu-common.h" 24 #include "qemu-common.h"
25 #include "disas.h" 25 #include "disas.h"
  26 +#include "sysemu.h"
26 #include "uboot_image.h" 27 #include "uboot_image.h"
27 28
28 /* return the size or -1 if error */ 29 /* return the size or -1 if error */
monitor.c
@@ -261,7 +261,7 @@ static void do_info_block(void) @@ -261,7 +261,7 @@ static void do_info_block(void)
261 } 261 }
262 262
263 /* get the current CPU defined by the user */ 263 /* get the current CPU defined by the user */
264 -int mon_set_cpu(int cpu_index) 264 +static int mon_set_cpu(int cpu_index)
265 { 265 {
266 CPUState *env; 266 CPUState *env;
267 267
@@ -274,7 +274,7 @@ int mon_set_cpu(int cpu_index) @@ -274,7 +274,7 @@ int mon_set_cpu(int cpu_index)
274 return -1; 274 return -1;
275 } 275 }
276 276
277 -CPUState *mon_get_cpu(void) 277 +static CPUState *mon_get_cpu(void)
278 { 278 {
279 if (!mon_cpu) { 279 if (!mon_cpu) {
280 mon_set_cpu(0); 280 mon_set_cpu(0);
@@ -82,7 +82,7 @@ void qemu_vfree(void *ptr) @@ -82,7 +82,7 @@ void qemu_vfree(void *ptr)
82 #include <sys/mman.h> 82 #include <sys/mman.h>
83 #include <fcntl.h> 83 #include <fcntl.h>
84 84
85 -void *kqemu_vmalloc(size_t size) 85 +static void *kqemu_vmalloc(size_t size)
86 { 86 {
87 static int phys_ram_fd = -1; 87 static int phys_ram_fd = -1;
88 static int phys_ram_size = 0; 88 static int phys_ram_size = 0;
@@ -164,7 +164,7 @@ void *kqemu_vmalloc(size_t size) @@ -164,7 +164,7 @@ void *kqemu_vmalloc(size_t size)
164 return ptr; 164 return ptr;
165 } 165 }
166 166
167 -void kqemu_vfree(void *ptr) 167 +static void kqemu_vfree(void *ptr)
168 { 168 {
169 /* may be useful some day, but currently we do not need to free */ 169 /* may be useful some day, but currently we do not need to free */
170 } 170 }
qemu-char.h
@@ -46,6 +46,7 @@ struct CharDriverState { @@ -46,6 +46,7 @@ struct CharDriverState {
46 }; 46 };
47 47
48 CharDriverState *qemu_chr_open(const char *filename); 48 CharDriverState *qemu_chr_open(const char *filename);
  49 +void qemu_chr_close(CharDriverState *chr);
49 void qemu_chr_printf(CharDriverState *s, const char *fmt, ...); 50 void qemu_chr_printf(CharDriverState *s, const char *fmt, ...);
50 int qemu_chr_write(CharDriverState *s, const uint8_t *buf, int len); 51 int qemu_chr_write(CharDriverState *s, const uint8_t *buf, int len);
51 void qemu_chr_send_event(CharDriverState *s, int event); 52 void qemu_chr_send_event(CharDriverState *s, int event);
target-i386/helper.c
@@ -1235,7 +1235,7 @@ void do_interrupt(int intno, int is_int, int error_code, @@ -1235,7 +1235,7 @@ void do_interrupt(int intno, int is_int, int error_code,
1235 * needed. It should only be called, if this is not an interrupt. 1235 * needed. It should only be called, if this is not an interrupt.
1236 * Returns the new exception number. 1236 * Returns the new exception number.
1237 */ 1237 */
1238 -int check_exception(int intno, int *error_code) 1238 +static int check_exception(int intno, int *error_code)
1239 { 1239 {
1240 char first_contributory = env->old_exception == 0 || 1240 char first_contributory = env->old_exception == 0 ||
1241 (env->old_exception >= 10 && 1241 (env->old_exception >= 10 &&
@@ -3051,7 +3051,7 @@ void helper_fstt_ST0_A0(void) @@ -3051,7 +3051,7 @@ void helper_fstt_ST0_A0(void)
3051 helper_fstt(ST0, A0); 3051 helper_fstt(ST0, A0);
3052 } 3052 }
3053 3053
3054 -void fpu_set_exception(int mask) 3054 +static void fpu_set_exception(int mask)
3055 { 3055 {
3056 env->fpus |= mask; 3056 env->fpus |= mask;
3057 if (env->fpus & (~env->fpuc & FPUC_EM)) 3057 if (env->fpus & (~env->fpuc & FPUC_EM))
translate-op.c
@@ -33,5 +33,8 @@ enum { @@ -33,5 +33,8 @@ enum {
33 }; 33 };
34 34
35 #include "dyngen.h" 35 #include "dyngen.h"
  36 +extern int dyngen_code(uint8_t *gen_code_buf,
  37 + uint16_t *label_offsets, uint16_t *jmp_offsets,
  38 + const uint16_t *opc_buf, const uint32_t *opparam_buf, const long *gen_labels);
36 #include "op.h" 39 #include "op.h"
37 40
usb-linux.c
@@ -907,10 +907,10 @@ static const char *usb_class_str(uint8_t class) @@ -907,10 +907,10 @@ static const char *usb_class_str(uint8_t class)
907 return p->class_name; 907 return p->class_name;
908 } 908 }
909 909
910 -void usb_info_device(int bus_num, int addr, int class_id,  
911 - int vendor_id, int product_id,  
912 - const char *product_name,  
913 - int speed) 910 +static void usb_info_device(int bus_num, int addr, int class_id,
  911 + int vendor_id, int product_id,
  912 + const char *product_name,
  913 + int speed)
914 { 914 {
915 const char *class_str, *speed_str; 915 const char *class_str, *speed_str;
916 916
@@ -242,7 +242,7 @@ const char *prom_envs[MAX_PROM_ENVS]; @@ -242,7 +242,7 @@ const char *prom_envs[MAX_PROM_ENVS];
242 target_phys_addr_t isa_mem_base = 0; 242 target_phys_addr_t isa_mem_base = 0;
243 PicState2 *isa_pic; 243 PicState2 *isa_pic;
244 244
245 -uint32_t default_ioport_readb(void *opaque, uint32_t address) 245 +static uint32_t default_ioport_readb(void *opaque, uint32_t address)
246 { 246 {
247 #ifdef DEBUG_UNUSED_IOPORT 247 #ifdef DEBUG_UNUSED_IOPORT
248 fprintf(stderr, "unused inb: port=0x%04x\n", address); 248 fprintf(stderr, "unused inb: port=0x%04x\n", address);
@@ -250,7 +250,7 @@ uint32_t default_ioport_readb(void *opaque, uint32_t address) @@ -250,7 +250,7 @@ uint32_t default_ioport_readb(void *opaque, uint32_t address)
250 return 0xff; 250 return 0xff;
251 } 251 }
252 252
253 -void default_ioport_writeb(void *opaque, uint32_t address, uint32_t data) 253 +static void default_ioport_writeb(void *opaque, uint32_t address, uint32_t data)
254 { 254 {
255 #ifdef DEBUG_UNUSED_IOPORT 255 #ifdef DEBUG_UNUSED_IOPORT
256 fprintf(stderr, "unused outb: port=0x%04x data=0x%02x\n", address, data); 256 fprintf(stderr, "unused outb: port=0x%04x data=0x%02x\n", address, data);
@@ -258,7 +258,7 @@ void default_ioport_writeb(void *opaque, uint32_t address, uint32_t data) @@ -258,7 +258,7 @@ void default_ioport_writeb(void *opaque, uint32_t address, uint32_t data)
258 } 258 }
259 259
260 /* default is to make two byte accesses */ 260 /* default is to make two byte accesses */
261 -uint32_t default_ioport_readw(void *opaque, uint32_t address) 261 +static uint32_t default_ioport_readw(void *opaque, uint32_t address)
262 { 262 {
263 uint32_t data; 263 uint32_t data;
264 data = ioport_read_table[0][address](ioport_opaque[address], address); 264 data = ioport_read_table[0][address](ioport_opaque[address], address);
@@ -267,14 +267,14 @@ uint32_t default_ioport_readw(void *opaque, uint32_t address) @@ -267,14 +267,14 @@ uint32_t default_ioport_readw(void *opaque, uint32_t address)
267 return data; 267 return data;
268 } 268 }
269 269
270 -void default_ioport_writew(void *opaque, uint32_t address, uint32_t data) 270 +static void default_ioport_writew(void *opaque, uint32_t address, uint32_t data)
271 { 271 {
272 ioport_write_table[0][address](ioport_opaque[address], address, data & 0xff); 272 ioport_write_table[0][address](ioport_opaque[address], address, data & 0xff);
273 address = (address + 1) & (MAX_IOPORTS - 1); 273 address = (address + 1) & (MAX_IOPORTS - 1);
274 ioport_write_table[0][address](ioport_opaque[address], address, (data >> 8) & 0xff); 274 ioport_write_table[0][address](ioport_opaque[address], address, (data >> 8) & 0xff);
275 } 275 }
276 276
277 -uint32_t default_ioport_readl(void *opaque, uint32_t address) 277 +static uint32_t default_ioport_readl(void *opaque, uint32_t address)
278 { 278 {
279 #ifdef DEBUG_UNUSED_IOPORT 279 #ifdef DEBUG_UNUSED_IOPORT
280 fprintf(stderr, "unused inl: port=0x%04x\n", address); 280 fprintf(stderr, "unused inl: port=0x%04x\n", address);
@@ -282,14 +282,14 @@ uint32_t default_ioport_readl(void *opaque, uint32_t address) @@ -282,14 +282,14 @@ uint32_t default_ioport_readl(void *opaque, uint32_t address)
282 return 0xffffffff; 282 return 0xffffffff;
283 } 283 }
284 284
285 -void default_ioport_writel(void *opaque, uint32_t address, uint32_t data) 285 +static void default_ioport_writel(void *opaque, uint32_t address, uint32_t data)
286 { 286 {
287 #ifdef DEBUG_UNUSED_IOPORT 287 #ifdef DEBUG_UNUSED_IOPORT
288 fprintf(stderr, "unused outl: port=0x%04x data=0x%02x\n", address, data); 288 fprintf(stderr, "unused outl: port=0x%04x data=0x%02x\n", address, data);
289 #endif 289 #endif
290 } 290 }
291 291
292 -void init_ioports(void) 292 +static void init_ioports(void)
293 { 293 {
294 int i; 294 int i;
295 295
@@ -961,7 +961,7 @@ QEMUClock *vm_clock; @@ -961,7 +961,7 @@ QEMUClock *vm_clock;
961 961
962 static QEMUTimer *active_timers[2]; 962 static QEMUTimer *active_timers[2];
963 963
964 -QEMUClock *qemu_new_clock(int type) 964 +static QEMUClock *qemu_new_clock(int type)
965 { 965 {
966 QEMUClock *clock; 966 QEMUClock *clock;
967 clock = qemu_mallocz(sizeof(QEMUClock)); 967 clock = qemu_mallocz(sizeof(QEMUClock));
@@ -1539,7 +1539,7 @@ static void init_timer_alarm(void) @@ -1539,7 +1539,7 @@ static void init_timer_alarm(void)
1539 alarm_timer = t; 1539 alarm_timer = t;
1540 } 1540 }
1541 1541
1542 -void quit_timers(void) 1542 +static void quit_timers(void)
1543 { 1543 {
1544 alarm_timer->stop(alarm_timer); 1544 alarm_timer->stop(alarm_timer);
1545 alarm_timer = NULL; 1545 alarm_timer = NULL;
@@ -1832,7 +1832,7 @@ static void mux_chr_update_read_handler(CharDriverState *chr) @@ -1832,7 +1832,7 @@ static void mux_chr_update_read_handler(CharDriverState *chr)
1832 d->mux_cnt++; 1832 d->mux_cnt++;
1833 } 1833 }
1834 1834
1835 -CharDriverState *qemu_chr_open_mux(CharDriverState *drv) 1835 +static CharDriverState *qemu_chr_open_mux(CharDriverState *drv)
1836 { 1836 {
1837 CharDriverState *chr; 1837 CharDriverState *chr;
1838 MuxDriver *d; 1838 MuxDriver *d;
@@ -3385,7 +3385,7 @@ void qemu_chr_close(CharDriverState *chr) @@ -3385,7 +3385,7 @@ void qemu_chr_close(CharDriverState *chr)
3385 /***********************************************************/ 3385 /***********************************************************/
3386 /* network device redirectors */ 3386 /* network device redirectors */
3387 3387
3388 -void hex_dump(FILE *f, const uint8_t *buf, int size) 3388 +static void hex_dump(FILE *f, const uint8_t *buf, int size)
3389 { 3389 {
3390 int len, i, j, c; 3390 int len, i, j, c;
3391 3391
@@ -3733,7 +3733,7 @@ static void smb_exit(void) @@ -3733,7 +3733,7 @@ static void smb_exit(void)
3733 } 3733 }
3734 3734
3735 /* automatic user mode samba server configuration */ 3735 /* automatic user mode samba server configuration */
3736 -void net_slirp_smb(const char *exported_dir) 3736 +static void net_slirp_smb(const char *exported_dir)
3737 { 3737 {
3738 char smb_conf[1024]; 3738 char smb_conf[1024];
3739 char smb_cmdline[1024]; 3739 char smb_cmdline[1024];
@@ -5127,7 +5127,7 @@ QEMUFile *qemu_fopen(const char *filename, const char *mode) @@ -5127,7 +5127,7 @@ QEMUFile *qemu_fopen(const char *filename, const char *mode)
5127 return NULL; 5127 return NULL;
5128 } 5128 }
5129 5129
5130 -QEMUFile *qemu_fopen_bdrv(BlockDriverState *bs, int64_t offset, int is_writable) 5130 +static QEMUFile *qemu_fopen_bdrv(BlockDriverState *bs, int64_t offset, int is_writable)
5131 { 5131 {
5132 QEMUFile *f; 5132 QEMUFile *f;
5133 5133
@@ -5361,7 +5361,7 @@ int register_savevm(const char *idstr, @@ -5361,7 +5361,7 @@ int register_savevm(const char *idstr,
5361 #define QEMU_VM_FILE_MAGIC 0x5145564d 5361 #define QEMU_VM_FILE_MAGIC 0x5145564d
5362 #define QEMU_VM_FILE_VERSION 0x00000002 5362 #define QEMU_VM_FILE_VERSION 0x00000002
5363 5363
5364 -int qemu_savevm_state(QEMUFile *f) 5364 +static int qemu_savevm_state(QEMUFile *f)
5365 { 5365 {
5366 SaveStateEntry *se; 5366 SaveStateEntry *se;
5367 int len, ret; 5367 int len, ret;
@@ -5384,7 +5384,6 @@ int qemu_savevm_state(QEMUFile *f) @@ -5384,7 +5384,6 @@ int qemu_savevm_state(QEMUFile *f)
5384 /* record size: filled later */ 5384 /* record size: filled later */
5385 len_pos = qemu_ftell(f); 5385 len_pos = qemu_ftell(f);
5386 qemu_put_be32(f, 0); 5386 qemu_put_be32(f, 0);
5387 -  
5388 se->save_state(f, se->opaque); 5387 se->save_state(f, se->opaque);
5389 5388
5390 /* fill record size */ 5389 /* fill record size */
@@ -5415,7 +5414,7 @@ static SaveStateEntry *find_se(const char *idstr, int instance_id) @@ -5415,7 +5414,7 @@ static SaveStateEntry *find_se(const char *idstr, int instance_id)
5415 return NULL; 5414 return NULL;
5416 } 5415 }
5417 5416
5418 -int qemu_loadvm_state(QEMUFile *f) 5417 +static int qemu_loadvm_state(QEMUFile *f)
5419 { 5418 {
5420 SaveStateEntry *se; 5419 SaveStateEntry *se;
5421 int len, ret, instance_id, record_len, version_id; 5420 int len, ret, instance_id, record_len, version_id;
@@ -6655,7 +6654,7 @@ int qemu_register_machine(QEMUMachine *m) @@ -6655,7 +6654,7 @@ int qemu_register_machine(QEMUMachine *m)
6655 return 0; 6654 return 0;
6656 } 6655 }
6657 6656
6658 -QEMUMachine *find_machine(const char *name) 6657 +static QEMUMachine *find_machine(const char *name)
6659 { 6658 {
6660 QEMUMachine *m; 6659 QEMUMachine *m;
6661 6660
@@ -6669,7 +6668,7 @@ QEMUMachine *find_machine(const char *name) @@ -6669,7 +6668,7 @@ QEMUMachine *find_machine(const char *name)
6669 /***********************************************************/ 6668 /***********************************************************/
6670 /* main execution loop */ 6669 /* main execution loop */
6671 6670
6672 -void gui_update(void *opaque) 6671 +static void gui_update(void *opaque)
6673 { 6672 {
6674 DisplayState *ds = opaque; 6673 DisplayState *ds = opaque;
6675 ds->dpy_refresh(ds); 6674 ds->dpy_refresh(ds);
@@ -6953,7 +6952,7 @@ void main_loop_wait(int timeout) @@ -6953,7 +6952,7 @@ void main_loop_wait(int timeout)
6953 6952
6954 static CPUState *cur_cpu; 6953 static CPUState *cur_cpu;
6955 6954
6956 -int main_loop(void) 6955 +static int main_loop(void)
6957 { 6956 {
6958 int ret, timeout; 6957 int ret, timeout;
6959 #ifdef CONFIG_PROFILER 6958 #ifdef CONFIG_PROFILER
@@ -7414,7 +7413,7 @@ static void read_passwords(void) @@ -7414,7 +7413,7 @@ static void read_passwords(void)
7414 } 7413 }
7415 7414
7416 /* XXX: currently we cannot use simultaneously different CPUs */ 7415 /* XXX: currently we cannot use simultaneously different CPUs */
7417 -void register_machines(void) 7416 +static void register_machines(void)
7418 { 7417 {
7419 #if defined(TARGET_I386) 7418 #if defined(TARGET_I386)
7420 qemu_register_machine(&pc_machine); 7419 qemu_register_machine(&pc_machine);
@@ -812,9 +812,9 @@ static uint32_t read_u32(uint8_t *data, size_t offset) @@ -812,9 +812,9 @@ static uint32_t read_u32(uint8_t *data, size_t offset)
812 } 812 }
813 813
814 #if CONFIG_VNC_TLS 814 #if CONFIG_VNC_TLS
815 -ssize_t vnc_tls_push(gnutls_transport_ptr_t transport,  
816 - const void *data,  
817 - size_t len) { 815 +static ssize_t vnc_tls_push(gnutls_transport_ptr_t transport,
  816 + const void *data,
  817 + size_t len) {
818 struct VncState *vs = (struct VncState *)transport; 818 struct VncState *vs = (struct VncState *)transport;
819 int ret; 819 int ret;
820 820
@@ -829,9 +829,9 @@ ssize_t vnc_tls_push(gnutls_transport_ptr_t transport, @@ -829,9 +829,9 @@ ssize_t vnc_tls_push(gnutls_transport_ptr_t transport,
829 } 829 }
830 830
831 831
832 -ssize_t vnc_tls_pull(gnutls_transport_ptr_t transport,  
833 - void *data,  
834 - size_t len) { 832 +static ssize_t vnc_tls_pull(gnutls_transport_ptr_t transport,
  833 + void *data,
  834 + size_t len) {
835 struct VncState *vs = (struct VncState *)transport; 835 struct VncState *vs = (struct VncState *)transport;
836 int ret; 836 int ret;
837 837
x_keymap.c
@@ -22,6 +22,7 @@ @@ -22,6 +22,7 @@
22 * THE SOFTWARE. 22 * THE SOFTWARE.
23 */ 23 */
24 #include "qemu-common.h" 24 #include "qemu-common.h"
  25 +#include "console.h"
25 26
26 static const uint8_t x_keycode_to_pc_keycode[115] = { 27 static const uint8_t x_keycode_to_pc_keycode[115] = {
27 0xc7, /* 97 Home */ 28 0xc7, /* 97 Home */