aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
Diffstat (limited to 'hw')
-rw-r--r--hw/9pfs/virtio-9p-handle.c4
-rw-r--r--hw/9pfs/virtio-9p-local.c4
-rw-r--r--hw/9pfs/virtio-9p-proxy.c4
-rw-r--r--hw/9pfs/virtio-9p.c3
-rw-r--r--hw/arm/digic_boards.c1
-rw-r--r--hw/arm/highbank.c1
-rw-r--r--hw/arm/nseries.c4
-rw-r--r--hw/arm/omap1.c65
-rw-r--r--hw/arm/omap2.c12
-rw-r--r--hw/arm/vexpress.c3
-rw-r--r--hw/arm/virt.c5
-rw-r--r--hw/char/omap_uart.c3
-rw-r--r--hw/core/loader.c2
-rw-r--r--hw/display/omap_dss.c15
-rw-r--r--hw/display/vga.c2
-rw-r--r--hw/dma/omap_dma.c8
-rw-r--r--hw/gpio/omap_gpio.c3
-rw-r--r--hw/i386/smbios.c10
-rw-r--r--hw/intc/arm_gic.c3
-rw-r--r--hw/intc/etraxfs_pic.c8
-rw-r--r--hw/mem/pc-dimm.c1
-rw-r--r--hw/misc/omap_gpmc.c3
-rw-r--r--hw/misc/omap_l4.c3
-rw-r--r--hw/misc/omap_sdrc.c3
-rw-r--r--hw/misc/omap_tap.c3
-rw-r--r--hw/nvram/fw_cfg.c2
-rw-r--r--hw/sd/omap_mmc.c3
-rw-r--r--hw/ssi/omap_spi.c3
-rw-r--r--hw/timer/a9gtimer.c2
-rw-r--r--hw/timer/omap_gptimer.c2
-rw-r--r--hw/tpm/tpm_tis.c2
-rw-r--r--hw/usb/hcd-musb.c20
32 files changed, 133 insertions, 74 deletions
diff --git a/hw/9pfs/virtio-9p-handle.c b/hw/9pfs/virtio-9p-handle.c
index 4b79cefd13..13eabb98a4 100644
--- a/hw/9pfs/virtio-9p-handle.c
+++ b/hw/9pfs/virtio-9p-handle.c
@@ -140,7 +140,7 @@ static int handle_opendir(FsContext *ctx,
static void handle_rewinddir(FsContext *ctx, V9fsFidOpenState *fs)
{
- return rewinddir(fs->dir);
+ rewinddir(fs->dir);
}
static off_t handle_telldir(FsContext *ctx, V9fsFidOpenState *fs)
@@ -157,7 +157,7 @@ static int handle_readdir_r(FsContext *ctx, V9fsFidOpenState *fs,
static void handle_seekdir(FsContext *ctx, V9fsFidOpenState *fs, off_t off)
{
- return seekdir(fs->dir, off);
+ seekdir(fs->dir, off);
}
static ssize_t handle_preadv(FsContext *ctx, V9fsFidOpenState *fs,
diff --git a/hw/9pfs/virtio-9p-local.c b/hw/9pfs/virtio-9p-local.c
index d6b1c0cdde..f1f2e2573b 100644
--- a/hw/9pfs/virtio-9p-local.c
+++ b/hw/9pfs/virtio-9p-local.c
@@ -378,7 +378,7 @@ static int local_opendir(FsContext *ctx,
static void local_rewinddir(FsContext *ctx, V9fsFidOpenState *fs)
{
- return rewinddir(fs->dir);
+ rewinddir(fs->dir);
}
static off_t local_telldir(FsContext *ctx, V9fsFidOpenState *fs)
@@ -409,7 +409,7 @@ again:
static void local_seekdir(FsContext *ctx, V9fsFidOpenState *fs, off_t off)
{
- return seekdir(fs->dir, off);
+ seekdir(fs->dir, off);
}
static ssize_t local_preadv(FsContext *ctx, V9fsFidOpenState *fs,
diff --git a/hw/9pfs/virtio-9p-proxy.c b/hw/9pfs/virtio-9p-proxy.c
index 71b6198bbd..1bc7881f03 100644
--- a/hw/9pfs/virtio-9p-proxy.c
+++ b/hw/9pfs/virtio-9p-proxy.c
@@ -669,7 +669,7 @@ static int proxy_opendir(FsContext *ctx,
static void proxy_rewinddir(FsContext *ctx, V9fsFidOpenState *fs)
{
- return rewinddir(fs->dir);
+ rewinddir(fs->dir);
}
static off_t proxy_telldir(FsContext *ctx, V9fsFidOpenState *fs)
@@ -686,7 +686,7 @@ static int proxy_readdir_r(FsContext *ctx, V9fsFidOpenState *fs,
static void proxy_seekdir(FsContext *ctx, V9fsFidOpenState *fs, off_t off)
{
- return seekdir(fs->dir, off);
+ seekdir(fs->dir, off);
}
static ssize_t proxy_preadv(FsContext *ctx, V9fsFidOpenState *fs,
diff --git a/hw/9pfs/virtio-9p.c b/hw/9pfs/virtio-9p.c
index 5861a5b826..4964da0d7e 100644
--- a/hw/9pfs/virtio-9p.c
+++ b/hw/9pfs/virtio-9p.c
@@ -1950,7 +1950,8 @@ static void v9fs_write(void *opaque)
err = pdu_unmarshal(pdu, offset, "dqd", &fid, &off, &count);
if (err < 0) {
- return complete_pdu(s, pdu, err);
+ complete_pdu(s, pdu, err);
+ return;
}
offset += err;
v9fs_init_qiov_from_pdu(&qiov_full, pdu, offset, count, true);
diff --git a/hw/arm/digic_boards.c b/hw/arm/digic_boards.c
index 7114c36e38..e576646e86 100644
--- a/hw/arm/digic_boards.c
+++ b/hw/arm/digic_boards.c
@@ -113,6 +113,7 @@ static void digic_load_rom(DigicBoardState *s, hwaddr addr,
error_report("Couldn't load rom image '%s'.", filename);
exit(1);
}
+ g_free(fn);
}
}
diff --git a/hw/arm/highbank.c b/hw/arm/highbank.c
index a92cdc3322..ddd10dc26f 100644
--- a/hw/arm/highbank.c
+++ b/hw/arm/highbank.c
@@ -282,6 +282,7 @@ static void calxeda_init(MachineState *machine, enum cxmachines machine_id)
if (load_image_targphys("sysram.bin", 0xfff88000, filesize) < 0) {
hw_error("Unable to load %s\n", bios_name);
}
+ g_free(sysboot_filename);
} else {
hw_error("Unable to find %s\n", bios_name);
}
diff --git a/hw/arm/nseries.c b/hw/arm/nseries.c
index 4d7be5e740..2a5406d98d 100644
--- a/hw/arm/nseries.c
+++ b/hw/arm/nseries.c
@@ -1403,12 +1403,12 @@ static struct arm_boot_info n810_binfo = {
static void n800_init(MachineState *machine)
{
- return n8x0_init(machine, &n800_binfo, 800);
+ n8x0_init(machine, &n800_binfo, 800);
}
static void n810_init(MachineState *machine)
{
- return n8x0_init(machine, &n810_binfo, 810);
+ n8x0_init(machine, &n810_binfo, 810);
}
static QEMUMachine n800_machine = {
diff --git a/hw/arm/omap1.c b/hw/arm/omap1.c
index abb183c2d5..061504495d 100644
--- a/hw/arm/omap1.c
+++ b/hw/arm/omap1.c
@@ -207,7 +207,8 @@ static void omap_mpu_timer_write(void *opaque, hwaddr addr,
struct omap_mpu_timer_s *s = (struct omap_mpu_timer_s *) opaque;
if (size != 4) {
- return omap_badwidth_write32(opaque, addr, value);
+ omap_badwidth_write32(opaque, addr, value);
+ return;
}
switch (addr) {
@@ -314,7 +315,8 @@ static void omap_wd_timer_write(void *opaque, hwaddr addr,
struct omap_watchdog_timer_s *s = (struct omap_watchdog_timer_s *) opaque;
if (size != 2) {
- return omap_badwidth_write16(opaque, addr, value);
+ omap_badwidth_write16(opaque, addr, value);
+ return;
}
switch (addr) {
@@ -440,7 +442,8 @@ static void omap_os_timer_write(void *opaque, hwaddr addr,
int offset = addr & OMAP_MPUI_REG_MASK;
if (size != 4) {
- return omap_badwidth_write32(opaque, addr, value);
+ omap_badwidth_write32(opaque, addr, value);
+ return;
}
switch (offset) {
@@ -585,7 +588,8 @@ static void omap_ulpd_pm_write(void *opaque, hwaddr addr,
uint16_t diff;
if (size != 2) {
- return omap_badwidth_write16(opaque, addr, value);
+ omap_badwidth_write16(opaque, addr, value);
+ return;
}
switch (addr) {
@@ -857,7 +861,8 @@ static void omap_pin_cfg_write(void *opaque, hwaddr addr,
uint32_t diff;
if (size != 4) {
- return omap_badwidth_write32(opaque, addr, value);
+ omap_badwidth_write32(opaque, addr, value);
+ return;
}
switch (addr) {
@@ -1012,7 +1017,8 @@ static void omap_id_write(void *opaque, hwaddr addr,
uint64_t value, unsigned size)
{
if (size != 4) {
- return omap_badwidth_write32(opaque, addr, value);
+ omap_badwidth_write32(opaque, addr, value);
+ return;
}
OMAP_BAD_REG(addr);
@@ -1081,7 +1087,8 @@ static void omap_mpui_write(void *opaque, hwaddr addr,
struct omap_mpu_state_s *s = (struct omap_mpu_state_s *) opaque;
if (size != 4) {
- return omap_badwidth_write32(opaque, addr, value);
+ omap_badwidth_write32(opaque, addr, value);
+ return;
}
switch (addr) {
@@ -1175,7 +1182,8 @@ static void omap_tipb_bridge_write(void *opaque, hwaddr addr,
struct omap_tipb_bridge_s *s = (struct omap_tipb_bridge_s *) opaque;
if (size < 2) {
- return omap_badwidth_write16(opaque, addr, value);
+ omap_badwidth_write16(opaque, addr, value);
+ return;
}
switch (addr) {
@@ -1284,7 +1292,8 @@ static void omap_tcmi_write(void *opaque, hwaddr addr,
struct omap_mpu_state_s *s = (struct omap_mpu_state_s *) opaque;
if (size != 4) {
- return omap_badwidth_write32(opaque, addr, value);
+ omap_badwidth_write32(opaque, addr, value);
+ return;
}
switch (addr) {
@@ -1379,7 +1388,8 @@ static void omap_dpll_write(void *opaque, hwaddr addr,
int div, mult;
if (size != 2) {
- return omap_badwidth_write16(opaque, addr, value);
+ omap_badwidth_write16(opaque, addr, value);
+ return;
}
if (addr == 0x00) { /* CTL_REG */
@@ -1647,7 +1657,8 @@ static void omap_clkm_write(void *opaque, hwaddr addr,
};
if (size != 2) {
- return omap_badwidth_write16(opaque, addr, value);
+ omap_badwidth_write16(opaque, addr, value);
+ return;
}
switch (addr) {
@@ -1775,7 +1786,8 @@ static void omap_clkdsp_write(void *opaque, hwaddr addr,
uint16_t diff;
if (size != 2) {
- return omap_badwidth_write16(opaque, addr, value);
+ omap_badwidth_write16(opaque, addr, value);
+ return;
}
switch (addr) {
@@ -1982,7 +1994,8 @@ static void omap_mpuio_write(void *opaque, hwaddr addr,
int ln;
if (size != 2) {
- return omap_badwidth_write16(opaque, addr, value);
+ omap_badwidth_write16(opaque, addr, value);
+ return;
}
switch (offset) {
@@ -2210,7 +2223,8 @@ static void omap_uwire_write(void *opaque, hwaddr addr,
int offset = addr & OMAP_MPUI_REG_MASK;
if (size != 2) {
- return omap_badwidth_write16(opaque, addr, value);
+ omap_badwidth_write16(opaque, addr, value);
+ return;
}
switch (offset) {
@@ -2349,7 +2363,8 @@ static void omap_pwl_write(void *opaque, hwaddr addr,
int offset = addr & OMAP_MPUI_REG_MASK;
if (size != 1) {
- return omap_badwidth_write8(opaque, addr, value);
+ omap_badwidth_write8(opaque, addr, value);
+ return;
}
switch (offset) {
@@ -2444,7 +2459,8 @@ static void omap_pwt_write(void *opaque, hwaddr addr,
int offset = addr & OMAP_MPUI_REG_MASK;
if (size != 1) {
- return omap_badwidth_write8(opaque, addr, value);
+ omap_badwidth_write8(opaque, addr, value);
+ return;
}
switch (offset) {
@@ -2637,7 +2653,8 @@ static void omap_rtc_write(void *opaque, hwaddr addr,
time_t ti[2];
if (size != 1) {
- return omap_badwidth_write8(opaque, addr, value);
+ omap_badwidth_write8(opaque, addr, value);
+ return;
}
switch (offset) {
@@ -3410,9 +3427,14 @@ static void omap_mcbsp_write(void *opaque, hwaddr addr,
uint64_t value, unsigned size)
{
switch (size) {
- case 2: return omap_mcbsp_writeh(opaque, addr, value);
- case 4: return omap_mcbsp_writew(opaque, addr, value);
- default: return omap_badwidth_write16(opaque, addr, value);
+ case 2:
+ omap_mcbsp_writeh(opaque, addr, value);
+ break;
+ case 4:
+ omap_mcbsp_writew(opaque, addr, value);
+ break;
+ default:
+ omap_badwidth_write16(opaque, addr, value);
}
}
@@ -3586,7 +3608,8 @@ static void omap_lpg_write(void *opaque, hwaddr addr,
int offset = addr & OMAP_MPUI_REG_MASK;
if (size != 1) {
- return omap_badwidth_write8(opaque, addr, value);
+ omap_badwidth_write8(opaque, addr, value);
+ return;
}
switch (offset) {
diff --git a/hw/arm/omap2.c b/hw/arm/omap2.c
index b083ebebc8..32390140c0 100644
--- a/hw/arm/omap2.c
+++ b/hw/arm/omap2.c
@@ -447,7 +447,8 @@ static void omap_eac_write(void *opaque, hwaddr addr,
struct omap_eac_s *s = (struct omap_eac_s *) opaque;
if (size != 2) {
- return omap_badwidth_write16(opaque, addr, value);
+ omap_badwidth_write16(opaque, addr, value);
+ return;
}
switch (addr) {
@@ -692,7 +693,8 @@ static void omap_sti_write(void *opaque, hwaddr addr,
struct omap_sti_s *s = (struct omap_sti_s *) opaque;
if (size != 4) {
- return omap_badwidth_write32(opaque, addr, value);
+ omap_badwidth_write32(opaque, addr, value);
+ return;
}
switch (addr) {
@@ -757,7 +759,8 @@ static void omap_sti_fifo_write(void *opaque, hwaddr addr,
uint8_t byte = value;
if (size != 1) {
- return omap_badwidth_write8(opaque, addr, size);
+ omap_badwidth_write8(opaque, addr, size);
+ return;
}
if (ch == STI_TRACE_CONTROL_CHANNEL) {
@@ -1359,7 +1362,8 @@ static void omap_prcm_write(void *opaque, hwaddr addr,
struct omap_prcm_s *s = (struct omap_prcm_s *) opaque;
if (size != 4) {
- return omap_badwidth_write32(opaque, addr, value);
+ omap_badwidth_write32(opaque, addr, value);
+ return;
}
switch (addr) {
diff --git a/hw/arm/vexpress.c b/hw/arm/vexpress.c
index 8496c1622a..e9a7cede64 100644
--- a/hw/arm/vexpress.c
+++ b/hw/arm/vexpress.c
@@ -562,7 +562,7 @@ static void vexpress_common_init(MachineState *machine)
* If a bios file was provided, attempt to map it into memory
*/
if (bios_name) {
- const char *fn;
+ char *fn;
if (drive_get(IF_PFLASH, 0, 0)) {
error_report("The contents of the first flash device may be "
@@ -576,6 +576,7 @@ static void vexpress_common_init(MachineState *machine)
error_report("Could not load ROM image '%s'", bios_name);
exit(1);
}
+ g_free(fn);
}
/* Motherboard peripherals: the wiring is the same but the
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 9072bc2b1c..b652b07ced 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -552,7 +552,7 @@ static void create_flash(const VirtBoardInfo *vbi)
char *nodename;
if (bios_name) {
- const char *fn;
+ char *fn;
if (drive_get(IF_PFLASH, 0, 0)) {
error_report("The contents of the first flash device may be "
@@ -565,6 +565,7 @@ static void create_flash(const VirtBoardInfo *vbi)
error_report("Could not load ROM image '%s'", bios_name);
exit(1);
}
+ g_free(fn);
}
create_one_flash("virt.flash0", flashbase, flashsize);
@@ -770,7 +771,7 @@ static void machvirt_init(MachineState *machine)
cc->parse_features(CPU(cpuobj), cpuopts, &err);
g_free(cpuopts);
if (err) {
- error_report("%s", error_get_pretty(err));
+ error_report_err(err);
exit(1);
}
diff --git a/hw/char/omap_uart.c b/hw/char/omap_uart.c
index 0b91693602..88f20943e4 100644
--- a/hw/char/omap_uart.c
+++ b/hw/char/omap_uart.c
@@ -112,7 +112,8 @@ static void omap_uart_write(void *opaque, hwaddr addr,
struct omap_uart_s *s = (struct omap_uart_s *) opaque;
if (size == 4) {
- return omap_badwidth_write8(opaque, addr, value);
+ omap_badwidth_write8(opaque, addr, value);
+ return;
}
switch (addr) {
diff --git a/hw/core/loader.c b/hw/core/loader.c
index 76d8acace9..d4c441fd18 100644
--- a/hw/core/loader.c
+++ b/hw/core/loader.c
@@ -267,7 +267,7 @@ int load_aout(const char *filename, hwaddr addr, int max_sz,
/* ELF loader */
-static void *load_at(int fd, int offset, int size)
+static void *load_at(int fd, off_t offset, size_t size)
{
void *ptr;
if (lseek(fd, offset, SEEK_SET) < 0)
diff --git a/hw/display/omap_dss.c b/hw/display/omap_dss.c
index 24ccbcc7a1..f1fef2767e 100644
--- a/hw/display/omap_dss.c
+++ b/hw/display/omap_dss.c
@@ -212,7 +212,8 @@ static void omap_diss_write(void *opaque, hwaddr addr,
struct omap_dss_s *s = (struct omap_dss_s *) opaque;
if (size != 4) {
- return omap_badwidth_write32(opaque, addr, value);
+ omap_badwidth_write32(opaque, addr, value);
+ return;
}
switch (addr) {
@@ -377,7 +378,8 @@ static void omap_disc_write(void *opaque, hwaddr addr,
struct omap_dss_s *s = (struct omap_dss_s *) opaque;
if (size != 4) {
- return omap_badwidth_write32(opaque, addr, value);
+ omap_badwidth_write32(opaque, addr, value);
+ return;
}
switch (addr) {
@@ -736,7 +738,8 @@ static void omap_rfbi_write(void *opaque, hwaddr addr,
struct omap_dss_s *s = (struct omap_dss_s *) opaque;
if (size != 4) {
- return omap_badwidth_write32(opaque, addr, value);
+ omap_badwidth_write32(opaque, addr, value);
+ return;
}
switch (addr) {
@@ -928,7 +931,8 @@ static void omap_venc_write(void *opaque, hwaddr addr,
uint64_t value, unsigned size)
{
if (size != 4) {
- return omap_badwidth_write32(opaque, addr, size);
+ omap_badwidth_write32(opaque, addr, size);
+ return;
}
switch (addr) {
@@ -1016,7 +1020,8 @@ static void omap_im3_write(void *opaque, hwaddr addr,
uint64_t value, unsigned size)
{
if (size != 4) {
- return omap_badwidth_write32(opaque, addr, value);
+ omap_badwidth_write32(opaque, addr, value);
+ return;
}
switch (addr) {
diff --git a/hw/display/vga.c b/hw/display/vga.c
index c0f7b343bb..d1d296c74e 100644
--- a/hw/display/vga.c
+++ b/hw/display/vga.c
@@ -1997,7 +1997,7 @@ static void vga_mem_write(void *opaque, hwaddr addr,
{
VGACommonState *s = opaque;
- return vga_mem_writeb(s, addr, data);
+ vga_mem_writeb(s, addr, data);
}
const MemoryRegionOps vga_mem_ops = {
diff --git a/hw/dma/omap_dma.c b/hw/dma/omap_dma.c
index 756a87acb8..97c57a03c0 100644
--- a/hw/dma/omap_dma.c
+++ b/hw/dma/omap_dma.c
@@ -136,7 +136,7 @@ struct omap_dma_s {
static inline void omap_dma_interrupts_update(struct omap_dma_s *s)
{
- return s->intr_update(s);
+ s->intr_update(s);
}
static void omap_dma_channel_load(struct omap_dma_channel_s *ch)
@@ -1502,7 +1502,8 @@ static void omap_dma_write(void *opaque, hwaddr addr,
int reg, ch;
if (size != 2) {
- return omap_badwidth_write16(opaque, addr, value);
+ omap_badwidth_write16(opaque, addr, value);
+ return;
}
switch (addr) {
@@ -1857,7 +1858,8 @@ static void omap_dma4_write(void *opaque, hwaddr addr,
struct omap_dma_channel_s *ch;
if (size == 1) {
- return omap_badwidth_write16(opaque, addr, value);
+ omap_badwidth_write16(opaque, addr, value);
+ return;
}
switch (addr) {
diff --git a/hw/gpio/omap_gpio.c b/hw/gpio/omap_gpio.c
index 938782a45d..9a43486890 100644
--- a/hw/gpio/omap_gpio.c
+++ b/hw/gpio/omap_gpio.c
@@ -113,7 +113,8 @@ static void omap_gpio_write(void *opaque, hwaddr addr,
int ln;
if (size != 2) {
- return omap_badwidth_write16(opaque, addr, value);
+ omap_badwidth_write16(opaque, addr, value);
+ return;
}
switch (offset) {
diff --git a/hw/i386/smbios.c b/hw/i386/smbios.c
index f2e9ab62ce..1341e02344 100644
--- a/hw/i386/smbios.c
+++ b/hw/i386/smbios.c
@@ -91,6 +91,7 @@ static struct {
static struct {
const char *loc_pfx, *bank, *manufacturer, *serial, *asset, *part;
+ uint16_t speed;
} type17;
static QemuOptsList qemu_smbios_opts = {
@@ -304,6 +305,10 @@ static const QemuOptDesc qemu_smbios_type17_opts[] = {
.name = "part",
.type = QEMU_OPT_STRING,
.help = "part number",
+ },{
+ .name = "speed",
+ .type = QEMU_OPT_NUMBER,
+ .help = "maximum capable speed",
},
{ /* end of list */ }
};
@@ -697,13 +702,13 @@ static void smbios_build_type_17_table(unsigned instance, uint64_t size)
SMBIOS_TABLE_SET_STR(17, bank_locator_str, type17.bank);
t->memory_type = 0x07; /* RAM */
t->type_detail = cpu_to_le16(0x02); /* Other */
- t->speed = cpu_to_le16(0); /* Unknown */
+ t->speed = cpu_to_le16(type17.speed);
SMBIOS_TABLE_SET_STR(17, manufacturer_str, type17.manufacturer);
SMBIOS_TABLE_SET_STR(17, serial_number_str, type17.serial);
SMBIOS_TABLE_SET_STR(17, asset_tag_number_str, type17.asset);
SMBIOS_TABLE_SET_STR(17, part_number_str, type17.part);
t->attributes = 0; /* Unknown */
- t->configured_clock_speed = cpu_to_le16(0); /* Unknown */
+ t->configured_clock_speed = t->speed; /* reuse value for max speed */
t->minimum_voltage = cpu_to_le16(0); /* Unknown */
t->maximum_voltage = cpu_to_le16(0); /* Unknown */
t->configured_voltage = cpu_to_le16(0); /* Unknown */
@@ -1083,6 +1088,7 @@ void smbios_entry_add(QemuOpts *opts)
save_opt(&type17.serial, opts, "serial");
save_opt(&type17.asset, opts, "asset");
save_opt(&type17.part, opts, "part");
+ type17.speed = qemu_opt_get_number(opts, "speed", 0);
return;
default:
error_report("Don't know how to build fields for SMBIOS type %ld",
diff --git a/hw/intc/arm_gic.c b/hw/intc/arm_gic.c
index 270ce05b58..a04c822832 100644
--- a/hw/intc/arm_gic.c
+++ b/hw/intc/arm_gic.c
@@ -704,7 +704,8 @@ static void gic_cpu_write(GICState *s, int cpu, int offset, uint32_t value)
s->bpr[cpu] = (value & 0x7);
break;
case 0x10: /* End Of Interrupt */
- return gic_complete_irq(s, cpu, value & 0x3ff);
+ gic_complete_irq(s, cpu, value & 0x3ff);
+ return;
case 0x1c: /* Aliased Binary Point */
if (s->revision >= 2) {
s->abpr[cpu] = (value & 0x7);
diff --git a/hw/intc/etraxfs_pic.c b/hw/intc/etraxfs_pic.c
index 636262b49f..bd588681ef 100644
--- a/hw/intc/etraxfs_pic.c
+++ b/hw/intc/etraxfs_pic.c
@@ -131,11 +131,13 @@ static void nmi_handler(void *opaque, int irq, int level)
}
static void irq_handler(void *opaque, int irq, int level)
-{
+{
struct etrax_pic *fs = (void *)opaque;
- if (irq >= 30)
- return nmi_handler(opaque, irq, level);
+ if (irq >= 30) {
+ nmi_handler(opaque, irq, level);
+ return;
+ }
irq -= 1;
fs->regs[R_R_VECT] &= ~(1 << irq);
diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c
index de81b9ceab..39f0c97c0c 100644
--- a/hw/mem/pc-dimm.c
+++ b/hw/mem/pc-dimm.c
@@ -351,6 +351,7 @@ static void pc_dimm_class_init(ObjectClass *oc, void *data)
dc->realize = pc_dimm_realize;
dc->props = pc_dimm_properties;
+ dc->desc = "DIMM memory module";
ddc->get_memory_region = pc_dimm_get_memory_region;
}
diff --git a/hw/misc/omap_gpmc.c b/hw/misc/omap_gpmc.c
index a0de52f9bf..74fc91c8e9 100644
--- a/hw/misc/omap_gpmc.c
+++ b/hw/misc/omap_gpmc.c
@@ -624,7 +624,8 @@ static void omap_gpmc_write(void *opaque, hwaddr addr,
struct omap_gpmc_cs_file_s *f;
if (size != 4 && gpmc_wordaccess_only(addr)) {
- return omap_badwidth_write32(opaque, addr, value);
+ omap_badwidth_write32(opaque, addr, value);
+ return;
}
switch (addr) {
diff --git a/hw/misc/omap_l4.c b/hw/misc/omap_l4.c
index f2372500c0..245ceac84c 100644
--- a/hw/misc/omap_l4.c
+++ b/hw/misc/omap_l4.c
@@ -82,7 +82,8 @@ static void omap_l4ta_write(void *opaque, hwaddr addr,
struct omap_target_agent_s *s = (struct omap_target_agent_s *) opaque;
if (size != 4) {
- return omap_badwidth_write32(opaque, addr, value);
+ omap_badwidth_write32(opaque, addr, value);
+ return;
}
switch (addr) {
diff --git a/hw/misc/omap_sdrc.c b/hw/misc/omap_sdrc.c
index ed62caf03f..3de0c0e9d0 100644
--- a/hw/misc/omap_sdrc.c
+++ b/hw/misc/omap_sdrc.c
@@ -92,7 +92,8 @@ static void omap_sdrc_write(void *opaque, hwaddr addr,
struct omap_sdrc_s *s = (struct omap_sdrc_s *) opaque;
if (size != 4) {
- return omap_badwidth_write32(opaque, addr, value);
+ omap_badwidth_write32(opaque, addr, value);
+ return;
}
switch (addr) {
diff --git a/hw/misc/omap_tap.c b/hw/misc/omap_tap.c
index 9d2b71014c..6f02bb9e4c 100644
--- a/hw/misc/omap_tap.c
+++ b/hw/misc/omap_tap.c
@@ -95,7 +95,8 @@ static void omap_tap_write(void *opaque, hwaddr addr,
uint64_t value, unsigned size)
{
if (size != 4) {
- return omap_badwidth_write32(opaque, addr, value);
+ omap_badwidth_write32(opaque, addr, value);
+ return;
}
OMAP_BAD_REG(addr);
diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c
index 78a37be42b..4caf5364da 100644
--- a/hw/nvram/fw_cfg.c
+++ b/hw/nvram/fw_cfg.c
@@ -472,7 +472,7 @@ void fw_cfg_add_string(FWCfgState *s, uint16_t key, const char *value)
{
size_t sz = strlen(value) + 1;
- return fw_cfg_add_bytes(s, key, g_memdup(value, sz), sz);
+ fw_cfg_add_bytes(s, key, g_memdup(value, sz), sz);
}
void fw_cfg_add_i16(FWCfgState *s, uint16_t key, uint16_t value)
diff --git a/hw/sd/omap_mmc.c b/hw/sd/omap_mmc.c
index 86c477d720..d072deca11 100644
--- a/hw/sd/omap_mmc.c
+++ b/hw/sd/omap_mmc.c
@@ -406,7 +406,8 @@ static void omap_mmc_write(void *opaque, hwaddr offset,
struct omap_mmc_s *s = (struct omap_mmc_s *) opaque;
if (size != 2) {
- return omap_badwidth_write16(opaque, offset, value);
+ omap_badwidth_write16(opaque, offset, value);
+ return;
}
switch (offset) {
diff --git a/hw/ssi/omap_spi.c b/hw/ssi/omap_spi.c
index 0ed3b110e6..119e325a64 100644
--- a/hw/ssi/omap_spi.c
+++ b/hw/ssi/omap_spi.c
@@ -226,7 +226,8 @@ static void omap_mcspi_write(void *opaque, hwaddr addr,
int ch = 0;
if (size != 4) {
- return omap_badwidth_write32(opaque, addr, value);
+ omap_badwidth_write32(opaque, addr, value);
+ return;
}
switch (addr) {
diff --git a/hw/timer/a9gtimer.c b/hw/timer/a9gtimer.c
index b087bbddb8..dd4aae8b3a 100644
--- a/hw/timer/a9gtimer.c
+++ b/hw/timer/a9gtimer.c
@@ -121,7 +121,7 @@ static void a9_gtimer_update_no_sync(void *opaque)
{
A9GTimerState *s = A9_GTIMER(opaque);
- return a9_gtimer_update(s, false);
+ a9_gtimer_update(s, false);
}
static uint64_t a9_gtimer_read(void *opaque, hwaddr addr, unsigned size)
diff --git a/hw/timer/omap_gptimer.c b/hw/timer/omap_gptimer.c
index b7f3d49ca6..b8c8c0137d 100644
--- a/hw/timer/omap_gptimer.c
+++ b/hw/timer/omap_gptimer.c
@@ -444,7 +444,7 @@ static void omap_gp_timer_writeh(void *opaque, hwaddr addr,
struct omap_gp_timer_s *s = (struct omap_gp_timer_s *) opaque;
if (addr & 2)
- return omap_gp_timer_write(opaque, addr, (value << 16) | s->writeh);
+ omap_gp_timer_write(opaque, addr, (value << 16) | s->writeh);
else
s->writeh = (uint16_t) value;
}
diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c
index 9084ca439e..815c8eace1 100644
--- a/hw/tpm/tpm_tis.c
+++ b/hw/tpm/tpm_tis.c
@@ -868,7 +868,7 @@ static void tpm_tis_mmio_write_intern(void *opaque, hwaddr addr,
static void tpm_tis_mmio_write(void *opaque, hwaddr addr,
uint64_t val, unsigned size)
{
- return tpm_tis_mmio_write_intern(opaque, addr, val, size, false);
+ tpm_tis_mmio_write_intern(opaque, addr, val, size, false);
}
static const MemoryRegionOps tpm_tis_memory_ops = {
diff --git a/hw/usb/hcd-musb.c b/hw/usb/hcd-musb.c
index 40809f610e..61cc87894e 100644
--- a/hw/usb/hcd-musb.c
+++ b/hw/usb/hcd-musb.c
@@ -554,8 +554,10 @@ static void musb_schedule_cb(USBPort *port, USBPacket *packey)
timeout = ep->timeout[dir];
else if (ep->interrupt[dir])
timeout = 8;
- else
- return musb_cb_tick(ep);
+ else {
+ musb_cb_tick(ep);
+ return;
+ }
if (!ep->intv_timer[dir])
ep->intv_timer[dir] = timer_new_ns(QEMU_CLOCK_VIRTUAL, musb_cb_tick, ep);
@@ -772,9 +774,11 @@ static void musb_rx_packet_complete(USBPacket *packey, void *opaque)
/* NAK timeouts are only generated in Bulk transfers and
* Data-errors in Isochronous. */
- if (ep->interrupt[1])
- return musb_packet(s, ep, epnum, USB_TOKEN_IN,
- packey->iov.size, musb_rx_packet_complete, 1);
+ if (ep->interrupt[1]) {
+ musb_packet(s, ep, epnum, USB_TOKEN_IN,
+ packey->iov.size, musb_rx_packet_complete, 1);
+ return;
+ }
ep->csr[1] |= MGC_M_RXCSR_DATAERROR;
if (!epnum)
@@ -864,8 +868,7 @@ static void musb_tx_rdy(MUSBState *s, int epnum)
* but it doesn't make sense for us to do that. */
}
- return musb_packet(s, ep, epnum, pid,
- total, musb_tx_packet_complete, 0);
+ musb_packet(s, ep, epnum, pid, total, musb_tx_packet_complete, 0);
}
static void musb_rx_req(MUSBState *s, int epnum)
@@ -929,8 +932,7 @@ static void musb_rx_req(MUSBState *s, int epnum)
}
#endif
- return musb_packet(s, ep, epnum, USB_TOKEN_IN,
- total, musb_rx_packet_complete, 1);
+ musb_packet(s, ep, epnum, USB_TOKEN_IN, total, musb_rx_packet_complete, 1);
}
static uint8_t musb_read_fifo(MUSBEndPoint *ep)