Skip to content

Commit

Permalink
Merge branch 'trivial-patches' of git://github.com/stefanha/qemu
Browse files Browse the repository at this point in the history
* 'trivial-patches' of git://github.com/stefanha/qemu:
  versatilepb: Use symbolic indices for ARM PIC
  qdev: kill bogus comment
  qemu-barrier: Fix compiler version check for future gcc versions
  hw: Add missing 'static' attribute for QEMUMachine
  cleanup useless return sentence
  qemu-sockets: Fix compiler warning (regression for MinGW)
  vnc: Fix spelling (hellmen -> hellman) in comment
  slirp: Fix spelling in comment (enought -> enough, insure -> ensure)
  tcg/arm: Use tcg_out_mov_reg rather than inline equivalent code
  cpu: Add missing 'static' attribute to qemu_global_mutex
  configure: Support empty target list (--target-list=)
  hw: Fix return value check for bdrv_read, bdrv_write
  • Loading branch information
aurel32 committed Oct 6, 2012
2 parents 6b2f90f + 02cd521 commit 048d361
Show file tree
Hide file tree
Showing 54 changed files with 56 additions and 111 deletions.
1 change: 0 additions & 1 deletion block/qed-table.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ static void qed_write_table_cb(void *opaque, int ret)
out:
qemu_vfree(write_table_cb->table);
gencb_complete(&write_table_cb->gencb, ret);
return;
}

/**
Expand Down
1 change: 0 additions & 1 deletion blockdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,6 @@ void qmp_transaction(BlockdevActionList *dev_list, Error **errp)
QSIMPLEQ_FOREACH_SAFE(states, &snap_bdrv_states, entry, next) {
g_free(states);
}
return;
}


Expand Down
5 changes: 3 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ cc_i386=i386-pc-linux-gnu-gcc
libs_qga=""
debug_info="yes"

target_list=""
# Don't accept a target_list environment variable.
unset target_list

# Default value for a variable defining feature "foo".
# * foo="no" feature will only be used if --enable-foo arg is given
Expand Down Expand Up @@ -1288,7 +1289,7 @@ if ! "$python" -c 'import sys; sys.exit(sys.version_info < (2,4) or sys.version_
exit 1
fi

if test -z "$target_list" ; then
if test -z "${target_list+xxx}" ; then
target_list="$default_target_list"
else
target_list=`echo "$target_list" | sed -e 's/,/ /g'`
Expand Down
2 changes: 1 addition & 1 deletion cpus.c
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ static void qemu_tcg_init_cpu_signals(void)
}
#endif /* _WIN32 */

QemuMutex qemu_global_mutex;
static QemuMutex qemu_global_mutex;
static QemuCond qemu_io_proceeded_cond;
static bool iothread_requesting_mutex;

Expand Down
5 changes: 0 additions & 5 deletions hw/9pfs/virtio-9p.c
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,6 @@ static void virtfs_reset(V9fsPDU *pdu)
error_report("9pfs:%s: One or more uncluncked fids "
"found during reset", __func__);
}
return;
}

#define P9_QID_TYPE_DIR 0x80
Expand Down Expand Up @@ -934,7 +933,6 @@ static void v9fs_version(void *opaque)
out:
complete_pdu(s, pdu, offset);
v9fs_string_free(&version);
return;
}

static void v9fs_attach(void *opaque)
Expand Down Expand Up @@ -1314,7 +1312,6 @@ static void v9fs_walk(void *opaque)
g_free(wnames);
g_free(qids);
}
return;
}

static int32_t get_iounit(V9fsPDU *pdu, V9fsPath *path)
Expand Down Expand Up @@ -2257,7 +2254,6 @@ static void v9fs_flush(void *opaque)
free_pdu(pdu->s, cancel_pdu);
}
complete_pdu(s, pdu, 7);
return;
}

static void v9fs_link(void *opaque)
Expand Down Expand Up @@ -2763,7 +2759,6 @@ static void v9fs_statfs(void *opaque)
put_fid(pdu, fidp);
out_nofid:
complete_pdu(s, pdu, retval);
return;
}

static void v9fs_mknod(void *opaque)
Expand Down
2 changes: 0 additions & 2 deletions hw/blizzard.c
Original file line number Diff line number Diff line change
Expand Up @@ -878,8 +878,6 @@ void s1d13745_write_block(void *opaque, int dc,
len -= 2;
buf += 2;
}

return;
}

static void blizzard_update_display(void *opaque)
Expand Down
1 change: 0 additions & 1 deletion hw/bt-hci.c
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,6 @@ static void bt_hci_lmp_connection_request(struct bt_link_s *link)
memcpy(&params.dev_class, &link->host->class, sizeof(params.dev_class));
params.link_type = ACL_LINK;
bt_hci_event(hci, EVT_CONN_REQUEST, &params, EVT_CONN_REQUEST_SIZE);
return;
}

static void bt_hci_conn_accept_timeout(void *opaque)
Expand Down
1 change: 0 additions & 1 deletion hw/device-hotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,4 @@ void drive_hot_add(Monitor *mon, const QDict *qdict)
if (dinfo) {
drive_put_ref(dinfo);
}
return;
}
4 changes: 0 additions & 4 deletions hw/exynos4210_combiner.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,6 @@ static void exynos4210_combiner_write(void *opaque, target_phys_addr_t offset,
TARGET_FMT_plx "\n", offset);
break;
}

return;
}

/* Get combiner group and bit from irq number */
Expand Down Expand Up @@ -380,8 +378,6 @@ static void exynos4210_combiner_handler(void *opaque, int irq, int level)
}

exynos4210_combiner_update(s, group_n);

return;
}

static void exynos4210_combiner_reset(DeviceState *d)
Expand Down
4 changes: 0 additions & 4 deletions hw/exynos4210_gic.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,6 @@ static void exynos4210_irq_handler(void *opaque, int irq, int level)

/* Bypass */
qemu_set_irq(s->board_irqs[irq], level);

return;
}

/*
Expand Down Expand Up @@ -410,8 +408,6 @@ static void exynos4210_irq_gate_handler(void *opaque, int irq, int level)
}

qemu_irq_lower(s->out);

return;
}

static void exynos4210_irq_gate_reset(DeviceState *d)
Expand Down
2 changes: 0 additions & 2 deletions hw/exynos4210_mct.c
Original file line number Diff line number Diff line change
Expand Up @@ -574,8 +574,6 @@ static void exynos4210_gfrc_event(void *opaque)
exynos4210_gfrc_set_count(&s->g_timer, distance);

exynos4210_gfrc_start(&s->g_timer);

return;
}

/*
Expand Down
2 changes: 0 additions & 2 deletions hw/fdc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1286,8 +1286,6 @@ static void fdctrl_start_transfer(FDCtrl *fdctrl, int direction)
fdctrl->msr |= FD_MSR_DIO;
/* IO based transfer: calculate len */
fdctrl_raise_irq(fdctrl, FD_SR0_SEEK);

return;
}

/* Prepare a transfer of deleted data */
Expand Down
1 change: 0 additions & 1 deletion hw/framebuffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,5 +107,4 @@ void framebuffer_update_display(
DIRTY_MEMORY_VGA);
*first_row = first;
*last_row = last;
return;
}
1 change: 0 additions & 1 deletion hw/ide/macio.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ static void pmac_ide_atapi_transfer_cb(void *opaque, int ret)
done:
bdrv_acct_done(s->bs, &s->acct);
io->dma_end(opaque);
return;
}

static void pmac_ide_transfer_cb(void *opaque, int ret)
Expand Down
4 changes: 0 additions & 4 deletions hw/ivshmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ static void ivshmem_IntrStatus_write(IVShmemState *s, uint32_t val)
s->intrstatus = val;

ivshmem_update_irq(s, val);
return;
}

static uint32_t ivshmem_IntrStatus_read(IVShmemState *s)
Expand Down Expand Up @@ -510,8 +509,6 @@ static void ivshmem_read(void *opaque, const uint8_t * buf, int flags)
if (ivshmem_has_feature(s, IVSHMEM_IOEVENTFD)) {
ivshmem_add_eventfd(s, incoming_posn, guest_max_eventfd);
}

return;
}

/* Select the MSI-X vectors used by device.
Expand All @@ -536,7 +533,6 @@ static void ivshmem_reset(DeviceState *d)

s->intrstatus = 0;
ivshmem_use_msix(s);
return;
}

static uint64_t ivshmem_get_size(IVShmemState * s) {
Expand Down
2 changes: 1 addition & 1 deletion hw/leon3.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ static void leon3_generic_hw_init(ram_addr_t ram_size,
}
}

QEMUMachine leon3_generic_machine = {
static QEMUMachine leon3_generic_machine = {
.name = "leon3_generic",
.desc = "Leon-3 generic",
.init = leon3_generic_hw_init,
Expand Down
1 change: 0 additions & 1 deletion hw/megasas.c
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,6 @@ static void megasas_finish_dcmd(MegasasCmd *cmd, uint32_t iov_size)
}
}
cmd->iov_size = 0;
return;
}

static int megasas_ctrl_get_info(MegasasState *s, MegasasCmd *cmd)
Expand Down
2 changes: 1 addition & 1 deletion hw/mips_fulong2e.c
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ static void mips_fulong2e_init(ram_addr_t ram_size, const char *boot_device,
network_init();
}

QEMUMachine mips_fulong2e_machine = {
static QEMUMachine mips_fulong2e_machine = {
.name = "fulong2e",
.desc = "Fulong 2e mini pc",
.init = mips_fulong2e_init,
Expand Down
1 change: 0 additions & 1 deletion hw/msix.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,6 @@ void msix_uninit(PCIDevice *dev, MemoryRegion *table_bar, MemoryRegion *pba_bar)
g_free(dev->msix_entry_used);
dev->msix_entry_used = NULL;
dev->cap_present &= ~QEMU_PCI_CAP_MSIX;
return;
}

void msix_uninit_exclusive_bar(PCIDevice *dev)
Expand Down
34 changes: 22 additions & 12 deletions hw/nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ static void glue(nand_blk_write_, PAGE_SIZE)(NANDFlashState *s)
sector = SECTOR(s->addr);
off = (s->addr & PAGE_MASK) + s->offset;
soff = SECTOR_OFFSET(s->addr);
if (bdrv_read(s->bdrv, sector, iobuf, PAGE_SECTORS) == -1) {
if (bdrv_read(s->bdrv, sector, iobuf, PAGE_SECTORS) < 0) {
printf("%s: read error in sector %" PRIu64 "\n", __func__, sector);
return;
}
Expand All @@ -666,21 +666,23 @@ static void glue(nand_blk_write_, PAGE_SIZE)(NANDFlashState *s)
MIN(OOB_SIZE, off + s->iolen - PAGE_SIZE));
}

if (bdrv_write(s->bdrv, sector, iobuf, PAGE_SECTORS) == -1)
if (bdrv_write(s->bdrv, sector, iobuf, PAGE_SECTORS) < 0) {
printf("%s: write error in sector %" PRIu64 "\n", __func__, sector);
}
} else {
off = PAGE_START(s->addr) + (s->addr & PAGE_MASK) + s->offset;
sector = off >> 9;
soff = off & 0x1ff;
if (bdrv_read(s->bdrv, sector, iobuf, PAGE_SECTORS + 2) == -1) {
if (bdrv_read(s->bdrv, sector, iobuf, PAGE_SECTORS + 2) < 0) {
printf("%s: read error in sector %" PRIu64 "\n", __func__, sector);
return;
}

mem_and(iobuf + soff, s->io, s->iolen);

if (bdrv_write(s->bdrv, sector, iobuf, PAGE_SECTORS + 2) == -1)
if (bdrv_write(s->bdrv, sector, iobuf, PAGE_SECTORS + 2) < 0) {
printf("%s: write error in sector %" PRIu64 "\n", __func__, sector);
}
}
s->offset = 0;
}
Expand All @@ -704,31 +706,37 @@ static void glue(nand_blk_erase_, PAGE_SIZE)(NANDFlashState *s)
i = SECTOR(addr);
page = SECTOR(addr + (ADDR_SHIFT + s->erase_shift));
for (; i < page; i ++)
if (bdrv_write(s->bdrv, i, iobuf, 1) == -1)
if (bdrv_write(s->bdrv, i, iobuf, 1) < 0) {
printf("%s: write error in sector %" PRIu64 "\n", __func__, i);
}
} else {
addr = PAGE_START(addr);
page = addr >> 9;
if (bdrv_read(s->bdrv, page, iobuf, 1) == -1)
if (bdrv_read(s->bdrv, page, iobuf, 1) < 0) {
printf("%s: read error in sector %" PRIu64 "\n", __func__, page);
}
memset(iobuf + (addr & 0x1ff), 0xff, (~addr & 0x1ff) + 1);
if (bdrv_write(s->bdrv, page, iobuf, 1) == -1)
if (bdrv_write(s->bdrv, page, iobuf, 1) < 0) {
printf("%s: write error in sector %" PRIu64 "\n", __func__, page);
}

memset(iobuf, 0xff, 0x200);
i = (addr & ~0x1ff) + 0x200;
for (addr += ((PAGE_SIZE + OOB_SIZE) << s->erase_shift) - 0x200;
i < addr; i += 0x200)
if (bdrv_write(s->bdrv, i >> 9, iobuf, 1) == -1)
if (bdrv_write(s->bdrv, i >> 9, iobuf, 1) < 0) {
printf("%s: write error in sector %" PRIu64 "\n",
__func__, i >> 9);
}

page = i >> 9;
if (bdrv_read(s->bdrv, page, iobuf, 1) == -1)
if (bdrv_read(s->bdrv, page, iobuf, 1) < 0) {
printf("%s: read error in sector %" PRIu64 "\n", __func__, page);
}
memset(iobuf, 0xff, ((addr - 1) & 0x1ff) + 1);
if (bdrv_write(s->bdrv, page, iobuf, 1) == -1)
if (bdrv_write(s->bdrv, page, iobuf, 1) < 0) {
printf("%s: write error in sector %" PRIu64 "\n", __func__, page);
}
}
}

Expand All @@ -740,18 +748,20 @@ static void glue(nand_blk_load_, PAGE_SIZE)(NANDFlashState *s,

if (s->bdrv) {
if (s->mem_oob) {
if (bdrv_read(s->bdrv, SECTOR(addr), s->io, PAGE_SECTORS) == -1)
if (bdrv_read(s->bdrv, SECTOR(addr), s->io, PAGE_SECTORS) < 0) {
printf("%s: read error in sector %" PRIu64 "\n",
__func__, SECTOR(addr));
}
memcpy(s->io + SECTOR_OFFSET(s->addr) + PAGE_SIZE,
s->storage + (PAGE(s->addr) << OOB_SHIFT),
OOB_SIZE);
s->ioaddr = s->io + SECTOR_OFFSET(s->addr) + offset;
} else {
if (bdrv_read(s->bdrv, PAGE_START(addr) >> 9,
s->io, (PAGE_SECTORS + 2)) == -1)
s->io, (PAGE_SECTORS + 2)) < 0) {
printf("%s: read error in sector %" PRIu64 "\n",
__func__, PAGE_START(addr) >> 9);
}
s->ioaddr = s->io + (PAGE_START(addr) & 0x1ff) + offset;
}
} else {
Expand Down
2 changes: 1 addition & 1 deletion hw/onenand.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ static inline int onenand_erase(OneNANDState *s, int sec, int num)
for (; num > 0; num--, sec++) {
if (s->bdrv_cur) {
int erasesec = s->secs_cur + (sec >> 5);
if (bdrv_write(s->bdrv_cur, sec, blankbuf, 1)) {
if (bdrv_write(s->bdrv_cur, sec, blankbuf, 1) < 0) {
goto fail;
}
if (bdrv_read(s->bdrv_cur, erasesec, tmpbuf, 1) < 0) {
Expand Down
1 change: 0 additions & 1 deletion hw/pflash_cfi01.c
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,6 @@ static void pflash_write(pflash_t *pfl, target_phys_addr_t offset,
pfl->bypass = 0;
pfl->wcycle = 0;
pfl->cmd = 0;
return;
}


Expand Down
1 change: 0 additions & 1 deletion hw/pflash_cfi02.c
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,6 @@ static void pflash_write (pflash_t *pfl, target_phys_addr_t offset,
do_bypass:
pfl->wcycle = 2;
pfl->cmd = 0;
return;
}


Expand Down
1 change: 0 additions & 1 deletion hw/pxa2xx_keypad.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ static void pxa27x_keyboard_event (PXA2xxKeyPadState *kp, int keycode)
kp->kpc |= KPC_MI;
qemu_irq_raise(kp->irq);
}
return;
}

static uint64_t pxa2xx_keypad_read(void *opaque, target_phys_addr_t offset,
Expand Down
1 change: 0 additions & 1 deletion hw/qdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ int qdev_hotplug = 0;
static bool qdev_hot_added = false;
static bool qdev_hot_removed = false;

/* Register a new device type. */
const VMStateDescription *qdev_get_vmsd(DeviceState *dev)
{
DeviceClass *dc = DEVICE_GET_CLASS(dev);
Expand Down
1 change: 0 additions & 1 deletion hw/sb16.c
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,6 @@ static void complete (SB16State *s)

ldebug ("\n");
s->cmd = -1;
return;
}

static void legacy_reset (SB16State *s)
Expand Down
Loading

0 comments on commit 048d361

Please sign in to comment.