* [Qemu-devel] [PULL 0/8] Trivial patches for 13 to 19 April 2013
@ 2013-04-19 11:33 Stefan Hajnoczi
2013-04-19 11:33 ` [Qemu-devel] [PATCH 1/8] bswap: fix compiler warning Stefan Hajnoczi
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: Stefan Hajnoczi @ 2013-04-19 11:33 UTC (permalink / raw)
To: qemu-devel; +Cc: Anthony Liguori, Stefan Hajnoczi
The following changes since commit 09dada400328d75daf79e3eca1e48e024fec148d:
configure: remove duplicate test (2013-04-18 14:12:31 +0200)
are available in the git repository at:
git://github.com/stefanha/qemu.git trivial-patches
for you to fetch changes up to ad6b40f471cf8bf7b106032145b1b2ac105f99cf:
m25p80: Remove bogus include of devices.h (2013-04-19 11:45:58 +0200)
----------------------------------------------------------------
Alexey Kardashevskiy (1):
bswap: fix compiler warning
Luiz Capitulino (1):
virtio.h: drop unused function prototypes
Petar Jovanovic (1):
linux-user: change do_semop to return target errno when unsuccessful
Peter Crosthwaite (1):
m25p80: Remove bogus include of devices.h
Richard W.M. Jones (1):
ssh: Remove unnecessary use of strlen function.
Stefan Weil (3):
Remove unneeded type casts
w64: Fix compiler warnings (wrong format specifier)
block/ssh: Add missing gcc format attributes
block/ssh.c | 10 ++++------
cpus.c | 4 ++--
hw/arm/armv7m.c | 12 ++++++------
hw/arm/boot.c | 4 ++--
hw/arm/musicpal.c | 8 ++++----
hw/arm/nseries.c | 4 ++--
hw/arm/omap1.c | 12 ++++++------
hw/audio/marvell_88w8618.c | 3 +--
hw/block/m25p80.c | 1 -
hw/display/pxa2xx_lcd.c | 2 +-
hw/dma/pxa2xx_dma.c | 2 +-
hw/dma/xilinx_axidma.c | 4 ++--
hw/gpio/zaurus.c | 2 +-
hw/microblaze/boot.c | 2 +-
hw/misc/macio/mac_dbdma.c | 8 ++++----
hw/misc/milkymist-pfpu.c | 4 ++--
hw/net/mcf_fec.c | 4 ++--
hw/ppc/ppc405_boards.c | 2 +-
hw/ppc/virtex_ml507.c | 2 +-
include/hw/virtio/virtio.h | 2 --
include/qemu/bswap.h | 1 +
linux-user/syscall.c | 4 ++--
22 files changed, 46 insertions(+), 51 deletions(-)
--
1.8.1.4
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Qemu-devel] [PATCH 1/8] bswap: fix compiler warning
2013-04-19 11:33 [Qemu-devel] [PULL 0/8] Trivial patches for 13 to 19 April 2013 Stefan Hajnoczi
@ 2013-04-19 11:33 ` Stefan Hajnoczi
2013-04-19 11:33 ` [Qemu-devel] [PATCH 2/8] virtio.h: drop unused function prototypes Stefan Hajnoczi
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Stefan Hajnoczi @ 2013-04-19 11:33 UTC (permalink / raw)
To: qemu-devel; +Cc: Alexey Kardashevskiy, Anthony Liguori, Stefan Hajnoczi
From: Alexey Kardashevskiy <aik@ozlabs.ru>
The bswap functions use memcpy but the bswap.h header itself does not seem to
include it in some configuration such as cross compiling for powerpc64
on x86_64 machine.
The patch explicitly includes string.h.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
include/qemu/bswap.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/qemu/bswap.h b/include/qemu/bswap.h
index d3af35d..14a5f65 100644
--- a/include/qemu/bswap.h
+++ b/include/qemu/bswap.h
@@ -4,6 +4,7 @@
#include "config-host.h"
#include <inttypes.h>
#include <limits.h>
+#include <string.h>
#include "fpu/softfloat.h"
#ifdef CONFIG_MACHINE_BSWAP_H
--
1.8.1.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [Qemu-devel] [PATCH 2/8] virtio.h: drop unused function prototypes
2013-04-19 11:33 [Qemu-devel] [PULL 0/8] Trivial patches for 13 to 19 April 2013 Stefan Hajnoczi
2013-04-19 11:33 ` [Qemu-devel] [PATCH 1/8] bswap: fix compiler warning Stefan Hajnoczi
@ 2013-04-19 11:33 ` Stefan Hajnoczi
2013-04-19 11:33 ` [Qemu-devel] [PATCH 3/8] Remove unneeded type casts Stefan Hajnoczi
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Stefan Hajnoczi @ 2013-04-19 11:33 UTC (permalink / raw)
To: qemu-devel; +Cc: Anthony Liguori, Stefan Hajnoczi, Luiz Capitulino
From: Luiz Capitulino <lcapitulino@redhat.com>
They are unused since commit 5c7d0962f60498c3f11d402e1c857cb9d5d8568d.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
include/hw/virtio/virtio.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h
index b21e5c2..d3f1436 100644
--- a/include/hw/virtio/virtio.h
+++ b/include/hw/virtio/virtio.h
@@ -258,7 +258,6 @@ VirtIODevice *virtio_net_init(DeviceState *dev, NICConf *conf,
uint32_t host_features);
typedef struct virtio_serial_conf virtio_serial_conf;
VirtIODevice *virtio_serial_init(DeviceState *dev, virtio_serial_conf *serial);
-VirtIODevice *virtio_balloon_init(DeviceState *dev);
typedef struct VirtIOSCSIConf VirtIOSCSIConf;
VirtIODevice *virtio_scsi_init(DeviceState *dev, VirtIOSCSIConf *conf);
typedef struct VirtIORNGConf VirtIORNGConf;
@@ -270,7 +269,6 @@ VirtIODevice *virtio_9p_init(DeviceState *dev, V9fsConf *conf);
void virtio_net_exit(VirtIODevice *vdev);
void virtio_serial_exit(VirtIODevice *vdev);
-void virtio_balloon_exit(VirtIODevice *vdev);
void virtio_scsi_exit(VirtIODevice *vdev);
void virtio_rng_exit(VirtIODevice *vdev);
--
1.8.1.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [Qemu-devel] [PATCH 3/8] Remove unneeded type casts
2013-04-19 11:33 [Qemu-devel] [PULL 0/8] Trivial patches for 13 to 19 April 2013 Stefan Hajnoczi
2013-04-19 11:33 ` [Qemu-devel] [PATCH 1/8] bswap: fix compiler warning Stefan Hajnoczi
2013-04-19 11:33 ` [Qemu-devel] [PATCH 2/8] virtio.h: drop unused function prototypes Stefan Hajnoczi
@ 2013-04-19 11:33 ` Stefan Hajnoczi
2013-04-19 11:33 ` [Qemu-devel] [PATCH 4/8] w64: Fix compiler warnings (wrong format specifier) Stefan Hajnoczi
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Stefan Hajnoczi @ 2013-04-19 11:33 UTC (permalink / raw)
To: qemu-devel; +Cc: Stefan Weil, Anthony Liguori, Stefan Hajnoczi
From: Stefan Weil <sw@weilnetz.de>
cpu_physical_memory_read, cpu_physical_memory_write take any pointer
as 2nd argument without needing a type cast.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
hw/arm/armv7m.c | 12 ++++++------
hw/arm/boot.c | 4 ++--
hw/arm/musicpal.c | 8 ++++----
hw/arm/nseries.c | 4 ++--
hw/arm/omap1.c | 12 ++++++------
hw/audio/marvell_88w8618.c | 3 +--
hw/display/pxa2xx_lcd.c | 2 +-
hw/dma/pxa2xx_dma.c | 2 +-
hw/dma/xilinx_axidma.c | 4 ++--
hw/gpio/zaurus.c | 2 +-
hw/microblaze/boot.c | 2 +-
hw/misc/macio/mac_dbdma.c | 8 ++++----
hw/misc/milkymist-pfpu.c | 4 ++--
hw/net/mcf_fec.c | 4 ++--
hw/ppc/ppc405_boards.c | 2 +-
hw/ppc/virtex_ml507.c | 2 +-
16 files changed, 37 insertions(+), 38 deletions(-)
diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c
index 2ae3576..93422bc 100644
--- a/hw/arm/armv7m.c
+++ b/hw/arm/armv7m.c
@@ -56,7 +56,7 @@ static uint32_t bitband_readw(void *opaque, hwaddr offset)
addr = bitband_addr(opaque, offset) & ~1;
mask = (1 << ((offset >> 2) & 15));
mask = tswap16(mask);
- cpu_physical_memory_read(addr, (uint8_t *)&v, 2);
+ cpu_physical_memory_read(addr, &v, 2);
return (v & mask) != 0;
}
@@ -69,12 +69,12 @@ static void bitband_writew(void *opaque, hwaddr offset,
addr = bitband_addr(opaque, offset) & ~1;
mask = (1 << ((offset >> 2) & 15));
mask = tswap16(mask);
- cpu_physical_memory_read(addr, (uint8_t *)&v, 2);
+ cpu_physical_memory_read(addr, &v, 2);
if (value & 1)
v |= mask;
else
v &= ~mask;
- cpu_physical_memory_write(addr, (uint8_t *)&v, 2);
+ cpu_physical_memory_write(addr, &v, 2);
}
static uint32_t bitband_readl(void *opaque, hwaddr offset)
@@ -85,7 +85,7 @@ static uint32_t bitband_readl(void *opaque, hwaddr offset)
addr = bitband_addr(opaque, offset) & ~3;
mask = (1 << ((offset >> 2) & 31));
mask = tswap32(mask);
- cpu_physical_memory_read(addr, (uint8_t *)&v, 4);
+ cpu_physical_memory_read(addr, &v, 4);
return (v & mask) != 0;
}
@@ -98,12 +98,12 @@ static void bitband_writel(void *opaque, hwaddr offset,
addr = bitband_addr(opaque, offset) & ~3;
mask = (1 << ((offset >> 2) & 31));
mask = tswap32(mask);
- cpu_physical_memory_read(addr, (uint8_t *)&v, 4);
+ cpu_physical_memory_read(addr, &v, 4);
if (value & 1)
v |= mask;
else
v &= ~mask;
- cpu_physical_memory_write(addr, (uint8_t *)&v, 4);
+ cpu_physical_memory_write(addr, &v, 4);
}
static const MemoryRegionOps bitband_ops = {
diff --git a/hw/arm/boot.c b/hw/arm/boot.c
index e9c0945..f451529 100644
--- a/hw/arm/boot.c
+++ b/hw/arm/boot.c
@@ -128,7 +128,7 @@ static void set_kernel_args(const struct arm_boot_info *info)
int cmdline_size;
cmdline_size = strlen(info->kernel_cmdline);
- cpu_physical_memory_write(p + 8, (void *)info->kernel_cmdline,
+ cpu_physical_memory_write(p + 8, info->kernel_cmdline,
cmdline_size + 1);
cmdline_size = (cmdline_size >> 2) + 1;
WRITE_WORD(p, cmdline_size + 2);
@@ -219,7 +219,7 @@ static void set_kernel_args_old(const struct arm_boot_info *info)
}
s = info->kernel_cmdline;
if (s) {
- cpu_physical_memory_write(p, (void *)s, strlen(s) + 1);
+ cpu_physical_memory_write(p, s, strlen(s) + 1);
} else {
WRITE_WORD(p, 0);
}
diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.c
index 31586c6..f33ba9a 100644
--- a/hw/arm/musicpal.c
+++ b/hw/arm/musicpal.c
@@ -170,12 +170,12 @@ static void eth_rx_desc_put(uint32_t addr, mv88w8618_rx_desc *desc)
cpu_to_le16s(&desc->buffer_size);
cpu_to_le32s(&desc->buffer);
cpu_to_le32s(&desc->next);
- cpu_physical_memory_write(addr, (void *)desc, sizeof(*desc));
+ cpu_physical_memory_write(addr, desc, sizeof(*desc));
}
static void eth_rx_desc_get(uint32_t addr, mv88w8618_rx_desc *desc)
{
- cpu_physical_memory_read(addr, (void *)desc, sizeof(*desc));
+ cpu_physical_memory_read(addr, desc, sizeof(*desc));
le32_to_cpus(&desc->cmdstat);
le16_to_cpus(&desc->bytes);
le16_to_cpus(&desc->buffer_size);
@@ -229,12 +229,12 @@ static void eth_tx_desc_put(uint32_t addr, mv88w8618_tx_desc *desc)
cpu_to_le16s(&desc->bytes);
cpu_to_le32s(&desc->buffer);
cpu_to_le32s(&desc->next);
- cpu_physical_memory_write(addr, (void *)desc, sizeof(*desc));
+ cpu_physical_memory_write(addr, desc, sizeof(*desc));
}
static void eth_tx_desc_get(uint32_t addr, mv88w8618_tx_desc *desc)
{
- cpu_physical_memory_read(addr, (void *)desc, sizeof(*desc));
+ cpu_physical_memory_read(addr, desc, sizeof(*desc));
le32_to_cpus(&desc->cmdstat);
le16_to_cpus(&desc->res);
le16_to_cpus(&desc->bytes);
diff --git a/hw/arm/nseries.c b/hw/arm/nseries.c
index 4976438..f6c9dc0 100644
--- a/hw/arm/nseries.c
+++ b/hw/arm/nseries.c
@@ -970,7 +970,7 @@ static void n800_gpmc_init(struct n800_s *s)
(4 << 0); /* BASEADDRESS */
cpu_physical_memory_write(0x6800a078, /* GPMC_CONFIG7_0 */
- (void *) &config7, sizeof(config7));
+ &config7, sizeof(config7));
}
/* Setup sequence done by the bootloader */
@@ -982,7 +982,7 @@ static void n8x0_boot_init(void *opaque)
/* PRCM setup */
#define omap_writel(addr, val) \
buf = (val); \
- cpu_physical_memory_write(addr, (void *) &buf, sizeof(buf))
+ cpu_physical_memory_write(addr, &buf, sizeof(buf))
omap_writel(0x48008060, 0x41); /* PRCM_CLKSRC_CTRL */
omap_writel(0x48008070, 1); /* PRCM_CLKOUT_CTRL */
diff --git a/hw/arm/omap1.c b/hw/arm/omap1.c
index f59f0f2..c06c642 100644
--- a/hw/arm/omap1.c
+++ b/hw/arm/omap1.c
@@ -31,7 +31,7 @@ uint32_t omap_badwidth_read8(void *opaque, hwaddr addr)
uint8_t ret;
OMAP_8B_REG(addr);
- cpu_physical_memory_read(addr, (void *) &ret, 1);
+ cpu_physical_memory_read(addr, &ret, 1);
return ret;
}
@@ -41,7 +41,7 @@ void omap_badwidth_write8(void *opaque, hwaddr addr,
uint8_t val8 = value;
OMAP_8B_REG(addr);
- cpu_physical_memory_write(addr, (void *) &val8, 1);
+ cpu_physical_memory_write(addr, &val8, 1);
}
uint32_t omap_badwidth_read16(void *opaque, hwaddr addr)
@@ -49,7 +49,7 @@ uint32_t omap_badwidth_read16(void *opaque, hwaddr addr)
uint16_t ret;
OMAP_16B_REG(addr);
- cpu_physical_memory_read(addr, (void *) &ret, 2);
+ cpu_physical_memory_read(addr, &ret, 2);
return ret;
}
@@ -59,7 +59,7 @@ void omap_badwidth_write16(void *opaque, hwaddr addr,
uint16_t val16 = value;
OMAP_16B_REG(addr);
- cpu_physical_memory_write(addr, (void *) &val16, 2);
+ cpu_physical_memory_write(addr, &val16, 2);
}
uint32_t omap_badwidth_read32(void *opaque, hwaddr addr)
@@ -67,7 +67,7 @@ uint32_t omap_badwidth_read32(void *opaque, hwaddr addr)
uint32_t ret;
OMAP_32B_REG(addr);
- cpu_physical_memory_read(addr, (void *) &ret, 4);
+ cpu_physical_memory_read(addr, &ret, 4);
return ret;
}
@@ -75,7 +75,7 @@ void omap_badwidth_write32(void *opaque, hwaddr addr,
uint32_t value)
{
OMAP_32B_REG(addr);
- cpu_physical_memory_write(addr, (void *) &value, 4);
+ cpu_physical_memory_write(addr, &value, 4);
}
/* MPU OS timers */
diff --git a/hw/audio/marvell_88w8618.c b/hw/audio/marvell_88w8618.c
index f9b68fd..de06dfd 100644
--- a/hw/audio/marvell_88w8618.c
+++ b/hw/audio/marvell_88w8618.c
@@ -77,8 +77,7 @@ static void mv88w8618_audio_callback(void *opaque, int free_out, int free_in)
if (block_size > 4096) {
return;
}
- cpu_physical_memory_read(s->target_buffer + s->play_pos, (void *)buf,
- block_size);
+ cpu_physical_memory_read(s->target_buffer + s->play_pos, buf, block_size);
mem_buffer = buf;
if (s->playback_mode & MP_AUDIO_16BIT_SAMPLE) {
if (s->playback_mode & MP_AUDIO_MONO) {
diff --git a/hw/display/pxa2xx_lcd.c b/hw/display/pxa2xx_lcd.c
index 12d9cd2..76276cf 100644
--- a/hw/display/pxa2xx_lcd.c
+++ b/hw/display/pxa2xx_lcd.c
@@ -315,7 +315,7 @@ static void pxa2xx_descriptor_load(PXA2xxLCDState *s)
continue;
}
- cpu_physical_memory_read(descptr, (void *)&desc, sizeof(desc));
+ cpu_physical_memory_read(descptr, &desc, sizeof(desc));
s->dma_ch[i].descriptor = tswap32(desc.fdaddr);
s->dma_ch[i].source = tswap32(desc.fsaddr);
s->dma_ch[i].id = tswap32(desc.fidr);
diff --git a/hw/dma/pxa2xx_dma.c b/hw/dma/pxa2xx_dma.c
index 6e4c1f6..b60569f 100644
--- a/hw/dma/pxa2xx_dma.c
+++ b/hw/dma/pxa2xx_dma.c
@@ -151,7 +151,7 @@ static inline void pxa2xx_dma_descriptor_fetch(
if ((s->chan[ch].descr & DDADR_BREN) && (s->chan[ch].state & DCSR_CMPST))
daddr += 32;
- cpu_physical_memory_read(daddr, (uint8_t *) desc, 16);
+ cpu_physical_memory_read(daddr, desc, 16);
s->chan[ch].descr = desc[DDADR];
s->chan[ch].src = desc[DSADR];
s->chan[ch].dest = desc[DTADR];
diff --git a/hw/dma/xilinx_axidma.c b/hw/dma/xilinx_axidma.c
index 1c23762..bc62664 100644
--- a/hw/dma/xilinx_axidma.c
+++ b/hw/dma/xilinx_axidma.c
@@ -197,7 +197,7 @@ static void stream_desc_load(struct Stream *s, hwaddr addr)
{
struct SDesc *d = &s->desc;
- cpu_physical_memory_read(addr, (void *) d, sizeof *d);
+ cpu_physical_memory_read(addr, d, sizeof *d);
/* Convert from LE into host endianness. */
d->buffer_address = le64_to_cpu(d->buffer_address);
@@ -215,7 +215,7 @@ static void stream_desc_store(struct Stream *s, hwaddr addr)
d->nxtdesc = cpu_to_le64(d->nxtdesc);
d->control = cpu_to_le32(d->control);
d->status = cpu_to_le32(d->status);
- cpu_physical_memory_write(addr, (void *) d, sizeof *d);
+ cpu_physical_memory_write(addr, d, sizeof *d);
}
static void stream_update_irq(struct Stream *s)
diff --git a/hw/gpio/zaurus.c b/hw/gpio/zaurus.c
index d853ea1..c6cdef3 100644
--- a/hw/gpio/zaurus.c
+++ b/hw/gpio/zaurus.c
@@ -287,6 +287,6 @@ static struct QEMU_PACKED sl_param_info {
void sl_bootparam_write(hwaddr ptr)
{
- cpu_physical_memory_write(ptr, (void *)&zaurus_bootparam,
+ cpu_physical_memory_write(ptr, &zaurus_bootparam,
sizeof(struct sl_param_info));
}
diff --git a/hw/microblaze/boot.c b/hw/microblaze/boot.c
index 23cb11d..e543d88 100644
--- a/hw/microblaze/boot.c
+++ b/hw/microblaze/boot.c
@@ -80,7 +80,7 @@ static int microblaze_load_dtb(hwaddr addr,
}
}
- cpu_physical_memory_write(addr, (void *)fdt, fdt_size);
+ cpu_physical_memory_write(addr, fdt, fdt_size);
#else
/* We lack libfdt so we cannot manipulate the fdt. Just pass on the blob
to the kernel. */
diff --git a/hw/misc/macio/mac_dbdma.c b/hw/misc/macio/mac_dbdma.c
index a2363bb..2fc7f87 100644
--- a/hw/misc/macio/mac_dbdma.c
+++ b/hw/misc/macio/mac_dbdma.c
@@ -192,7 +192,7 @@ static void dbdma_cmdptr_load(DBDMA_channel *ch)
DBDMA_DPRINTF("dbdma_cmdptr_load 0x%08x\n",
ch->regs[DBDMA_CMDPTR_LO]);
cpu_physical_memory_read(ch->regs[DBDMA_CMDPTR_LO],
- (uint8_t*)&ch->current, sizeof(dbdma_cmd));
+ &ch->current, sizeof(dbdma_cmd));
}
static void dbdma_cmdptr_save(DBDMA_channel *ch)
@@ -203,7 +203,7 @@ static void dbdma_cmdptr_save(DBDMA_channel *ch)
le16_to_cpu(ch->current.xfer_status),
le16_to_cpu(ch->current.res_count));
cpu_physical_memory_write(ch->regs[DBDMA_CMDPTR_LO],
- (uint8_t*)&ch->current, sizeof(dbdma_cmd));
+ &ch->current, sizeof(dbdma_cmd));
}
static void kill_channel(DBDMA_channel *ch)
@@ -454,7 +454,7 @@ static void load_word(DBDMA_channel *ch, int key, uint32_t addr,
return;
}
- cpu_physical_memory_read(addr, (uint8_t*)&val, len);
+ cpu_physical_memory_read(addr, &val, len);
if (len == 2)
val = (val << 16) | (current->cmd_dep & 0x0000ffff);
@@ -499,7 +499,7 @@ static void store_word(DBDMA_channel *ch, int key, uint32_t addr,
else if (len == 1)
val >>= 24;
- cpu_physical_memory_write(addr, (uint8_t*)&val, len);
+ cpu_physical_memory_write(addr, &val, len);
if (conditional_wait(ch))
goto wait;
diff --git a/hw/misc/milkymist-pfpu.c b/hw/misc/milkymist-pfpu.c
index ad44b4d..fe1b039 100644
--- a/hw/misc/milkymist-pfpu.c
+++ b/hw/misc/milkymist-pfpu.c
@@ -228,8 +228,8 @@ static int pfpu_decode_insn(MilkymistPFPUState *s)
hwaddr dma_ptr =
get_dma_address(s->regs[R_MESHBASE],
s->gp_regs[GPR_X], s->gp_regs[GPR_Y]);
- cpu_physical_memory_write(dma_ptr, (uint8_t *)&a, 4);
- cpu_physical_memory_write(dma_ptr + 4, (uint8_t *)&b, 4);
+ cpu_physical_memory_write(dma_ptr, &a, 4);
+ cpu_physical_memory_write(dma_ptr + 4, &b, 4);
s->regs[R_LASTDMA] = dma_ptr + 4;
D_EXEC(qemu_log("VECTOUT a=%08x b=%08x dma=%08x\n", a, b, dma_ptr));
trace_milkymist_pfpu_vectout(a, b, dma_ptr);
diff --git a/hw/net/mcf_fec.c b/hw/net/mcf_fec.c
index 9b68052..2ef5a0d 100644
--- a/hw/net/mcf_fec.c
+++ b/hw/net/mcf_fec.c
@@ -108,7 +108,7 @@ typedef struct {
static void mcf_fec_read_bd(mcf_fec_bd *bd, uint32_t addr)
{
- cpu_physical_memory_read(addr, (uint8_t *)bd, sizeof(*bd));
+ cpu_physical_memory_read(addr, bd, sizeof(*bd));
be16_to_cpus(&bd->flags);
be16_to_cpus(&bd->length);
be32_to_cpus(&bd->data);
@@ -120,7 +120,7 @@ static void mcf_fec_write_bd(mcf_fec_bd *bd, uint32_t addr)
tmp.flags = cpu_to_be16(bd->flags);
tmp.length = cpu_to_be16(bd->length);
tmp.data = cpu_to_be32(bd->data);
- cpu_physical_memory_write(addr, (uint8_t *)&tmp, sizeof(tmp));
+ cpu_physical_memory_write(addr, &tmp, sizeof(tmp));
}
static void mcf_fec_update(mcf_fec_state *s)
diff --git a/hw/ppc/ppc405_boards.c b/hw/ppc/ppc405_boards.c
index 8e56b16..f0c7ee9 100644
--- a/hw/ppc/ppc405_boards.c
+++ b/hw/ppc/ppc405_boards.c
@@ -337,7 +337,7 @@ static void ref405ep_init(QEMUMachineInitArgs *args)
if (kernel_cmdline != NULL) {
len = strlen(kernel_cmdline);
bdloc -= ((len + 255) & ~255);
- cpu_physical_memory_write(bdloc, (void *)kernel_cmdline, len + 1);
+ cpu_physical_memory_write(bdloc, kernel_cmdline, len + 1);
env->gpr[6] = bdloc;
env->gpr[7] = bdloc + len;
} else {
diff --git a/hw/ppc/virtex_ml507.c b/hw/ppc/virtex_ml507.c
index 6728ba7..1b4ce76 100644
--- a/hw/ppc/virtex_ml507.c
+++ b/hw/ppc/virtex_ml507.c
@@ -161,7 +161,7 @@ static int xilinx_load_device_tree(hwaddr addr,
r = qemu_devtree_setprop_string(fdt, "/chosen", "bootargs", kernel_cmdline);
if (r < 0)
fprintf(stderr, "couldn't set /chosen/bootargs\n");
- cpu_physical_memory_write (addr, (void *)fdt, fdt_size);
+ cpu_physical_memory_write(addr, fdt, fdt_size);
#else
/* We lack libfdt so we cannot manipulate the fdt. Just pass on the blob
to the kernel. */
--
1.8.1.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [Qemu-devel] [PATCH 4/8] w64: Fix compiler warnings (wrong format specifier)
2013-04-19 11:33 [Qemu-devel] [PULL 0/8] Trivial patches for 13 to 19 April 2013 Stefan Hajnoczi
` (2 preceding siblings ...)
2013-04-19 11:33 ` [Qemu-devel] [PATCH 3/8] Remove unneeded type casts Stefan Hajnoczi
@ 2013-04-19 11:33 ` Stefan Hajnoczi
2013-04-19 11:33 ` [Qemu-devel] [PATCH 5/8] linux-user: change do_semop to return target errno when unsuccessful Stefan Hajnoczi
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Stefan Hajnoczi @ 2013-04-19 11:33 UTC (permalink / raw)
To: qemu-devel; +Cc: Stefan Weil, Anthony Liguori, Stefan Hajnoczi
From: Stefan Weil <sw@weilnetz.de>
GetLastError() returns a DWORD value which is unsigned long,
so the correct format specifier is %lu.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
cpus.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/cpus.c b/cpus.c
index c15ff6c..5a98a37 100644
--- a/cpus.c
+++ b/cpus.c
@@ -865,7 +865,7 @@ static void qemu_cpu_kick_thread(CPUState *cpu)
CONTEXT tcgContext;
if (SuspendThread(cpu->hThread) == (DWORD)-1) {
- fprintf(stderr, "qemu:%s: GetLastError:%d\n", __func__,
+ fprintf(stderr, "qemu:%s: GetLastError:%lu\n", __func__,
GetLastError());
exit(1);
}
@@ -881,7 +881,7 @@ static void qemu_cpu_kick_thread(CPUState *cpu)
cpu_signal(0);
if (ResumeThread(cpu->hThread) == (DWORD)-1) {
- fprintf(stderr, "qemu:%s: GetLastError:%d\n", __func__,
+ fprintf(stderr, "qemu:%s: GetLastError:%lu\n", __func__,
GetLastError());
exit(1);
}
--
1.8.1.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [Qemu-devel] [PATCH 5/8] linux-user: change do_semop to return target errno when unsuccessful
2013-04-19 11:33 [Qemu-devel] [PULL 0/8] Trivial patches for 13 to 19 April 2013 Stefan Hajnoczi
` (3 preceding siblings ...)
2013-04-19 11:33 ` [Qemu-devel] [PATCH 4/8] w64: Fix compiler warnings (wrong format specifier) Stefan Hajnoczi
@ 2013-04-19 11:33 ` Stefan Hajnoczi
2013-04-19 11:33 ` [Qemu-devel] [PATCH 6/8] block/ssh: Add missing gcc format attributes Stefan Hajnoczi
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Stefan Hajnoczi @ 2013-04-19 11:33 UTC (permalink / raw)
To: qemu-devel; +Cc: Anthony Liguori, Petar Jovanovic, Stefan Hajnoczi
From: Petar Jovanovic <petar.jovanovic@imgtec.com>
do_semop() is called from two places, and one of these fails to convert
return error to target errno when semop fails. This patch changes the
function to always return target errno in case of an unsuccessful call.
Signed-off-by: Petar Jovanovic <petar.jovanovic@imgtec.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
linux-user/syscall.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 1f07621..d6d2050 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -2764,7 +2764,7 @@ static inline abi_long do_semop(int semid, abi_long ptr, unsigned nsops)
if (target_to_host_sembuf(sops, ptr, nsops))
return -TARGET_EFAULT;
- return semop(semid, sops, nsops);
+ return get_errno(semop(semid, sops, nsops));
}
struct target_msqid_ds
@@ -6957,7 +6957,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
#endif
#ifdef TARGET_NR_semop
case TARGET_NR_semop:
- ret = get_errno(do_semop(arg1, arg2, arg3));
+ ret = do_semop(arg1, arg2, arg3);
break;
#endif
#ifdef TARGET_NR_semctl
--
1.8.1.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [Qemu-devel] [PATCH 6/8] block/ssh: Add missing gcc format attributes
2013-04-19 11:33 [Qemu-devel] [PULL 0/8] Trivial patches for 13 to 19 April 2013 Stefan Hajnoczi
` (4 preceding siblings ...)
2013-04-19 11:33 ` [Qemu-devel] [PATCH 5/8] linux-user: change do_semop to return target errno when unsuccessful Stefan Hajnoczi
@ 2013-04-19 11:33 ` Stefan Hajnoczi
2013-04-19 11:34 ` [Qemu-devel] [PATCH 7/8] ssh: Remove unnecessary use of strlen function Stefan Hajnoczi
2013-04-19 11:34 ` [Qemu-devel] [PATCH 8/8] m25p80: Remove bogus include of devices.h Stefan Hajnoczi
7 siblings, 0 replies; 9+ messages in thread
From: Stefan Hajnoczi @ 2013-04-19 11:33 UTC (permalink / raw)
To: qemu-devel; +Cc: Stefan Weil, Anthony Liguori, Stefan Hajnoczi
From: Stefan Weil <sw@weilnetz.de>
Now gcc will check whether format string and variable arguments match.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
block/ssh.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/ssh.c b/block/ssh.c
index 8f78e2e..b4e048c 100644
--- a/block/ssh.c
+++ b/block/ssh.c
@@ -109,7 +109,7 @@ static void ssh_state_free(BDRVSSHState *s)
/* Wrappers around error_report which make sure to dump as much
* information from libssh2 as possible.
*/
-static void
+static void GCC_FMT_ATTR(2, 3)
session_error_report(BDRVSSHState *s, const char *fs, ...)
{
va_list args;
@@ -132,7 +132,7 @@ session_error_report(BDRVSSHState *s, const char *fs, ...)
error_printf("\n");
}
-static void
+static void GCC_FMT_ATTR(2, 3)
sftp_error_report(BDRVSSHState *s, const char *fs, ...)
{
va_list args;
--
1.8.1.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [Qemu-devel] [PATCH 7/8] ssh: Remove unnecessary use of strlen function.
2013-04-19 11:33 [Qemu-devel] [PULL 0/8] Trivial patches for 13 to 19 April 2013 Stefan Hajnoczi
` (5 preceding siblings ...)
2013-04-19 11:33 ` [Qemu-devel] [PATCH 6/8] block/ssh: Add missing gcc format attributes Stefan Hajnoczi
@ 2013-04-19 11:34 ` Stefan Hajnoczi
2013-04-19 11:34 ` [Qemu-devel] [PATCH 8/8] m25p80: Remove bogus include of devices.h Stefan Hajnoczi
7 siblings, 0 replies; 9+ messages in thread
From: Stefan Hajnoczi @ 2013-04-19 11:34 UTC (permalink / raw)
To: qemu-devel; +Cc: Anthony Liguori, Richard W.M. Jones, Stefan Hajnoczi
From: "Richard W.M. Jones" <rjones@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
block/ssh.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/block/ssh.c b/block/ssh.c
index b4e048c..93a8b53 100644
--- a/block/ssh.c
+++ b/block/ssh.c
@@ -387,15 +387,13 @@ static int check_host_key(BDRVSSHState *s, const char *host, int port,
}
/* host_key_check=md5:xx:yy:zz:... */
- if (strlen(host_key_check) >= 4 &&
- strncmp(host_key_check, "md5:", 4) == 0) {
+ if (strncmp(host_key_check, "md5:", 4) == 0) {
return check_host_key_hash(s, &host_key_check[4],
LIBSSH2_HOSTKEY_HASH_MD5, 16);
}
/* host_key_check=sha1:xx:yy:zz:... */
- if (strlen(host_key_check) >= 5 &&
- strncmp(host_key_check, "sha1:", 5) == 0) {
+ if (strncmp(host_key_check, "sha1:", 5) == 0) {
return check_host_key_hash(s, &host_key_check[5],
LIBSSH2_HOSTKEY_HASH_SHA1, 20);
}
--
1.8.1.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [Qemu-devel] [PATCH 8/8] m25p80: Remove bogus include of devices.h
2013-04-19 11:33 [Qemu-devel] [PULL 0/8] Trivial patches for 13 to 19 April 2013 Stefan Hajnoczi
` (6 preceding siblings ...)
2013-04-19 11:34 ` [Qemu-devel] [PATCH 7/8] ssh: Remove unnecessary use of strlen function Stefan Hajnoczi
@ 2013-04-19 11:34 ` Stefan Hajnoczi
7 siblings, 0 replies; 9+ messages in thread
From: Stefan Hajnoczi @ 2013-04-19 11:34 UTC (permalink / raw)
To: qemu-devel; +Cc: Anthony Liguori, Peter Crosthwaite, Stefan Hajnoczi
From: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
I think in the early revisions of this we had an instantiation helper
for the device in devices.h. This was later removed and this header was
left over. Removed
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
hw/block/m25p80.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c
index efcc7f4..b3ca19a 100644
--- a/hw/block/m25p80.c
+++ b/hw/block/m25p80.c
@@ -24,7 +24,6 @@
#include "hw/hw.h"
#include "sysemu/blockdev.h"
#include "hw/ssi.h"
-#include "hw/devices.h"
#ifndef M25P80_ERR_DEBUG
#define M25P80_ERR_DEBUG 0
--
1.8.1.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
end of thread, other threads:[~2013-04-19 11:34 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-19 11:33 [Qemu-devel] [PULL 0/8] Trivial patches for 13 to 19 April 2013 Stefan Hajnoczi
2013-04-19 11:33 ` [Qemu-devel] [PATCH 1/8] bswap: fix compiler warning Stefan Hajnoczi
2013-04-19 11:33 ` [Qemu-devel] [PATCH 2/8] virtio.h: drop unused function prototypes Stefan Hajnoczi
2013-04-19 11:33 ` [Qemu-devel] [PATCH 3/8] Remove unneeded type casts Stefan Hajnoczi
2013-04-19 11:33 ` [Qemu-devel] [PATCH 4/8] w64: Fix compiler warnings (wrong format specifier) Stefan Hajnoczi
2013-04-19 11:33 ` [Qemu-devel] [PATCH 5/8] linux-user: change do_semop to return target errno when unsuccessful Stefan Hajnoczi
2013-04-19 11:33 ` [Qemu-devel] [PATCH 6/8] block/ssh: Add missing gcc format attributes Stefan Hajnoczi
2013-04-19 11:34 ` [Qemu-devel] [PATCH 7/8] ssh: Remove unnecessary use of strlen function Stefan Hajnoczi
2013-04-19 11:34 ` [Qemu-devel] [PATCH 8/8] m25p80: Remove bogus include of devices.h Stefan Hajnoczi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).