All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL trivial 00/11] trivial patches for 2013-07-27
@ 2013-07-27  7:33 Michael Tokarev
  2013-07-27  7:33 ` [Qemu-devel] [PULL trivial 01/11] aes: Remove unused code (NDEBUG, u16) Michael Tokarev
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: Michael Tokarev @ 2013-07-27  7:33 UTC (permalink / raw)
  To: anthony; +Cc: qemu-trivial, Michael Tokarev, qemu-devel

We collected a few more trivial patches this week, including a compile
failure fix for 32bit builds by Stefan Weil.

Please pull.

The following changes since commit 200a06397f5d3e982028fd78b25b420507ade021:

  Merge remote-tracking branch 'afaerber/tags/qom-cpu-for-anthony' into staging (2013-07-26 17:53:19 -0500)

are available in the git repository at:


  git://git.corpit.ru/qemu.git trivial-patches

for you to fetch changes up to 6c86f405efd6532b58ad1b607cc9f11e856ef5ca:

  target-mips: Remove assignment to a variable which is never used (2013-07-27 11:22:54 +0400)

----------------------------------------------------------------
Liu Ping Fan (1):
      timer: make timers_state static

Petar Jovanovic (1):
      linux-user: correct argument number for sys_mremap and sys_splice

Ramkumar Ramachandra (1):
      qemu-options: mention C-a h in the -nographic doc

Stefan Weil (8):
      aes: Remove unused code (NDEBUG, u16)
      hw/9pfs: Fix potential memory leak and avoid reuse of freed memory
      exec: Remove env from list of poisoned names
      watchdog: Remove break after exit
      PPC: dbdma: macio: Fix format specifiers (build regression)
      misc: Fix new typos in comments and strings
      misc: Use g_assert_not_reached for code which is expected to be unreachable
      target-mips: Remove assignment to a variable which is never used

 block/vhdx.h                       |    2 +-
 blockdev.c                         |    2 +-
 cpus.c                             |    2 +-
 docs/rdma.txt                      |    2 +-
 hw/9pfs/virtio-9p-proxy.c          |    2 ++
 hw/ide/macio.c                     |    9 +++++----
 hw/net/vmxnet3.c                   |   16 ++++++++--------
 hw/net/vmxnet_tx_pkt.c             |    2 +-
 hw/usb/hcd-ehci.c                  |    8 ++++----
 hw/virtio/virtio-balloon.c         |    4 ++--
 hw/watchdog/watchdog.c             |    1 -
 hw/xen/xen_pt.c                    |    3 ++-
 include/exec/poison.h              |    1 -
 linux-user/main.c                  |    4 ++--
 migration-rdma.c                   |    4 ++--
 net/eth.c                          |    2 +-
 qdev-monitor.c                     |    4 ++--
 qemu-options.hx                    |    3 ++-
 target-arm/helper.c                |    2 +-
 target-mips/op_helper.c            |    1 -
 tests/test-qmp-input-visitor.c     |    2 +-
 tests/test-qmp-output-visitor.c    |    4 ++--
 tests/test-visitor-serialization.c |    8 ++++----
 util/aes.c                         |    5 -----
 24 files changed, 45 insertions(+), 48 deletions(-)

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Qemu-devel] [PULL trivial 01/11] aes: Remove unused code (NDEBUG, u16)
  2013-07-27  7:33 [Qemu-devel] [PULL trivial 00/11] trivial patches for 2013-07-27 Michael Tokarev
@ 2013-07-27  7:33 ` Michael Tokarev
  2013-07-27  7:33 ` [Qemu-devel] [PULL trivial 02/11] timer: make timers_state static Michael Tokarev
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Michael Tokarev @ 2013-07-27  7:33 UTC (permalink / raw)
  To: anthony; +Cc: qemu-trivial, Stefan Weil, Michael Tokarev, qemu-devel

From: Stefan Weil <sw@weilnetz.de>

The current code includes assert.h very early (from qemu-common.h),
so the definition of NDEBUG was without any effect.

In the initial version from 2004, NDEBUG was used to disable the assertions.
Those assertions are not in time critical code, so it is no longer
reasonable to disable them and the definition of NDEBUG can be removed.

Type u16 is also unused and therefore does not need a type definition.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 util/aes.c |    5 -----
 1 file changed, 5 deletions(-)

diff --git a/util/aes.c b/util/aes.c
index 91e97fa..4b4d88e 100644
--- a/util/aes.c
+++ b/util/aes.c
@@ -30,12 +30,7 @@
 #include "qemu-common.h"
 #include "qemu/aes.h"
 
-#ifndef NDEBUG
-#define NDEBUG
-#endif
-
 typedef uint32_t u32;
-typedef uint16_t u16;
 typedef uint8_t u8;
 
 /* This controls loop-unrolling in aes_core.c */
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Qemu-devel] [PULL trivial 02/11] timer: make timers_state static
  2013-07-27  7:33 [Qemu-devel] [PULL trivial 00/11] trivial patches for 2013-07-27 Michael Tokarev
  2013-07-27  7:33 ` [Qemu-devel] [PULL trivial 01/11] aes: Remove unused code (NDEBUG, u16) Michael Tokarev
@ 2013-07-27  7:33 ` Michael Tokarev
  2013-07-27  7:33 ` [Qemu-devel] [PULL trivial 03/11] hw/9pfs: Fix potential memory leak and avoid reuse of freed memory Michael Tokarev
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Michael Tokarev @ 2013-07-27  7:33 UTC (permalink / raw)
  To: anthony
  Cc: qemu-trivial, Liu Ping Fan, Michael Tokarev, Liu Ping Fan, qemu-devel

From: Liu Ping Fan <qemulist@gmail.com>

Signed-off-by: Liu Ping Fan <pingfank@linux.vnet.ibm.com>
Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 cpus.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cpus.c b/cpus.c
index ca6b886..0f65e76 100644
--- a/cpus.c
+++ b/cpus.c
@@ -112,7 +112,7 @@ typedef struct TimersState {
     int64_t dummy;
 } TimersState;
 
-TimersState timers_state;
+static TimersState timers_state;
 
 /* Return the virtual CPU time, based on the instruction counter.  */
 int64_t cpu_get_icount(void)
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Qemu-devel] [PULL trivial 03/11] hw/9pfs: Fix potential memory leak and avoid reuse of freed memory
  2013-07-27  7:33 [Qemu-devel] [PULL trivial 00/11] trivial patches for 2013-07-27 Michael Tokarev
  2013-07-27  7:33 ` [Qemu-devel] [PULL trivial 01/11] aes: Remove unused code (NDEBUG, u16) Michael Tokarev
  2013-07-27  7:33 ` [Qemu-devel] [PULL trivial 02/11] timer: make timers_state static Michael Tokarev
@ 2013-07-27  7:33 ` Michael Tokarev
  2013-07-27  7:33 ` [Qemu-devel] [PULL trivial 04/11] exec: Remove env from list of poisoned names Michael Tokarev
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Michael Tokarev @ 2013-07-27  7:33 UTC (permalink / raw)
  To: anthony; +Cc: qemu-trivial, Stefan Weil, Michael Tokarev, qemu-devel

From: Stefan Weil <sw@weilnetz.de>

The leak was reported by cppcheck.

Function proxy_init also calls g_free for ctx->fs_root.
Avoid reuse of this memory by setting ctx->fs_root to NULL.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: M. Mohan Kumar <mohan@in.ibm.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 hw/9pfs/virtio-9p-proxy.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/9pfs/virtio-9p-proxy.c b/hw/9pfs/virtio-9p-proxy.c
index 8ba2959..5f44bb7 100644
--- a/hw/9pfs/virtio-9p-proxy.c
+++ b/hw/9pfs/virtio-9p-proxy.c
@@ -1153,10 +1153,12 @@ static int proxy_init(FsContext *ctx)
         sock_id = atoi(ctx->fs_root);
         if (sock_id < 0) {
             fprintf(stderr, "socket descriptor not initialized\n");
+            g_free(proxy);
             return -1;
         }
     }
     g_free(ctx->fs_root);
+    ctx->fs_root = NULL;
 
     proxy->in_iovec.iov_base  = g_malloc(PROXY_MAX_IO_SZ + PROXY_HDR_SZ);
     proxy->in_iovec.iov_len   = PROXY_MAX_IO_SZ + PROXY_HDR_SZ;
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Qemu-devel] [PULL trivial 04/11] exec: Remove env from list of poisoned names
  2013-07-27  7:33 [Qemu-devel] [PULL trivial 00/11] trivial patches for 2013-07-27 Michael Tokarev
                   ` (2 preceding siblings ...)
  2013-07-27  7:33 ` [Qemu-devel] [PULL trivial 03/11] hw/9pfs: Fix potential memory leak and avoid reuse of freed memory Michael Tokarev
@ 2013-07-27  7:33 ` Michael Tokarev
  2013-07-27  7:33 ` [Qemu-devel] [PULL trivial 05/11] watchdog: Remove break after exit Michael Tokarev
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Michael Tokarev @ 2013-07-27  7:33 UTC (permalink / raw)
  To: anthony; +Cc: qemu-trivial, Stefan Weil, Michael Tokarev, qemu-devel

From: Stefan Weil <sw@weilnetz.de>

The global variable env was removed some time ago, so this name may be
used without any restriction now.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 include/exec/poison.h |    1 -
 1 file changed, 1 deletion(-)

diff --git a/include/exec/poison.h b/include/exec/poison.h
index 2341a75..a4b1eca 100644
--- a/include/exec/poison.h
+++ b/include/exec/poison.h
@@ -36,7 +36,6 @@
 #pragma GCC poison TARGET_PAGE_ALIGN
 
 #pragma GCC poison CPUArchState
-#pragma GCC poison env
 
 #pragma GCC poison lduw_phys
 #pragma GCC poison ldl_phys
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Qemu-devel] [PULL trivial 05/11] watchdog: Remove break after exit
  2013-07-27  7:33 [Qemu-devel] [PULL trivial 00/11] trivial patches for 2013-07-27 Michael Tokarev
                   ` (3 preceding siblings ...)
  2013-07-27  7:33 ` [Qemu-devel] [PULL trivial 04/11] exec: Remove env from list of poisoned names Michael Tokarev
@ 2013-07-27  7:33 ` Michael Tokarev
  2013-07-27  7:33 ` [Qemu-devel] [PULL trivial 06/11] PPC: dbdma: macio: Fix format specifiers (build regression) Michael Tokarev
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Michael Tokarev @ 2013-07-27  7:33 UTC (permalink / raw)
  To: anthony; +Cc: qemu-trivial, Stefan Weil, Michael Tokarev, qemu-devel

From: Stefan Weil <sw@weilnetz.de>

This was dead code.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 hw/watchdog/watchdog.c |    1 -
 1 file changed, 1 deletion(-)

diff --git a/hw/watchdog/watchdog.c b/hw/watchdog/watchdog.c
index cb4e1f9..387962e 100644
--- a/hw/watchdog/watchdog.c
+++ b/hw/watchdog/watchdog.c
@@ -128,7 +128,6 @@ void watchdog_perform_action(void)
     case WDT_POWEROFF:          /* same as 'quit' command in monitor */
         watchdog_mon_event("poweroff");
         exit(0);
-        break;
 
     case WDT_PAUSE:             /* same as 'stop' command in monitor */
         watchdog_mon_event("pause");
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Qemu-devel] [PULL trivial 06/11] PPC: dbdma: macio: Fix format specifiers (build regression)
  2013-07-27  7:33 [Qemu-devel] [PULL trivial 00/11] trivial patches for 2013-07-27 Michael Tokarev
                   ` (4 preceding siblings ...)
  2013-07-27  7:33 ` [Qemu-devel] [PULL trivial 05/11] watchdog: Remove break after exit Michael Tokarev
@ 2013-07-27  7:33 ` Michael Tokarev
  2013-07-27  7:33 ` [Qemu-devel] [PULL trivial 07/11] linux-user: correct argument number for sys_mremap and sys_splice Michael Tokarev
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Michael Tokarev @ 2013-07-27  7:33 UTC (permalink / raw)
  To: anthony; +Cc: qemu-trivial, Stefan Weil, Michael Tokarev, qemu-devel

From: Stefan Weil <sw@weilnetz.de>

Fix a number of warnings for 32 bit builds (tested on MingW and Linux):

  CC    hw/ide/macio.o
qemu/hw/ide/macio.c: In function 'pmac_ide_atapi_transfer_cb':
qemu/hw/ide/macio.c:134:9: error: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'hwaddr' [-Werror=format]
qemu/hw/ide/macio.c: In function 'pmac_ide_transfer_cb':
qemu/hw/ide/macio.c:215:5: error: format '%ld' expects argument of type 'long int', but argument 5 has type 'int64_t' [-Werror=format]
qemu/hw/ide/macio.c:222:9: error: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'hwaddr' [-Werror=format]
qemu/hw/ide/macio.c:264:9: error: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'hwaddr' [-Werror=format]
cc1: all warnings being treated as errors
make: *** [hw/ide/macio.o] Error 1

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Acked-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 hw/ide/macio.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/hw/ide/macio.c b/hw/ide/macio.c
index 38ad924..ef4ba2b 100644
--- a/hw/ide/macio.c
+++ b/hw/ide/macio.c
@@ -131,7 +131,7 @@ static void pmac_ide_atapi_transfer_cb(void *opaque, int ret)
         int sector_num = (s->lba << 2) + (s->io_buffer_index >> 9);
         int nsector = io->len >> 9;
 
-        MACIO_DPRINTF("precopying unaligned %d bytes to %#lx\n",
+        MACIO_DPRINTF("precopying unaligned %d bytes to %#" HWADDR_PRIx "\n",
                       unaligned, io->addr + io->len - unaligned);
 
         bdrv_read(s->bs, sector_num + nsector, io->remainder, 1);
@@ -212,14 +212,15 @@ static void pmac_ide_transfer_cb(void *opaque, int ret)
         s->nsector -= n;
     }
 
-    MACIO_DPRINTF("remainder: %d io->len: %d nsector: %d sector_num: %ld\n",
+    MACIO_DPRINTF("remainder: %d io->len: %d nsector: %d "
+                  "sector_num: %" PRId64 "\n",
                   io->remainder_len, io->len, s->nsector, sector_num);
     if (io->remainder_len && io->len) {
         /* guest wants the rest of its previous transfer */
         int remainder_len = MIN(io->remainder_len, io->len);
         uint8_t *p = &io->remainder[0x200 - remainder_len];
 
-        MACIO_DPRINTF("copying remainder %d bytes at %#lx\n",
+        MACIO_DPRINTF("copying remainder %d bytes at %#" HWADDR_PRIx "\n",
                       remainder_len, io->addr);
 
         switch (s->dma_cmd) {
@@ -261,7 +262,7 @@ static void pmac_ide_transfer_cb(void *opaque, int ret)
     if (unaligned) {
         int nsector = io->len >> 9;
 
-        MACIO_DPRINTF("precopying unaligned %d bytes to %#lx\n",
+        MACIO_DPRINTF("precopying unaligned %d bytes to %#" HWADDR_PRIx "\n",
                       unaligned, io->addr + io->len - unaligned);
 
         switch (s->dma_cmd) {
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Qemu-devel] [PULL trivial 07/11] linux-user: correct argument number for sys_mremap and sys_splice
  2013-07-27  7:33 [Qemu-devel] [PULL trivial 00/11] trivial patches for 2013-07-27 Michael Tokarev
                   ` (5 preceding siblings ...)
  2013-07-27  7:33 ` [Qemu-devel] [PULL trivial 06/11] PPC: dbdma: macio: Fix format specifiers (build regression) Michael Tokarev
@ 2013-07-27  7:33 ` Michael Tokarev
  2013-07-27  7:33 ` [Qemu-devel] [PULL trivial 08/11] misc: Fix new typos in comments and strings Michael Tokarev
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Michael Tokarev @ 2013-07-27  7:33 UTC (permalink / raw)
  To: anthony; +Cc: qemu-trivial, Michael Tokarev, Petar Jovanovic, qemu-devel

From: Petar Jovanovic <petar.jovanovic@imgtec.com>

sys_mremap missed 5th argument (new_address), which caused examples that
remap to a specific address to fail.
sys_splice missed 5th and 6th argument which caused different examples to
fail.
This change has an effect on MIPS target only.

Signed-off-by: Petar Jovanovic <petar.jovanovic@imgtec.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 linux-user/main.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/linux-user/main.c b/linux-user/main.c
index 5309117..03859bc 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -1920,7 +1920,7 @@ static const uint8_t mips_syscall_args[] = {
 	MIPS_SYS(sys_sched_get_priority_min, 1)
 	MIPS_SYS(sys_sched_rr_get_interval, 2)	/* 4165 */
 	MIPS_SYS(sys_nanosleep,	2)
-	MIPS_SYS(sys_mremap	, 4)
+	MIPS_SYS(sys_mremap	, 5)
 	MIPS_SYS(sys_accept	, 3)
 	MIPS_SYS(sys_bind	, 3)
 	MIPS_SYS(sys_connect	, 3)	/* 4170 */
@@ -2057,7 +2057,7 @@ static const uint8_t mips_syscall_args[] = {
 	MIPS_SYS(sys_pselect6, 6)
 	MIPS_SYS(sys_ppoll, 5)
 	MIPS_SYS(sys_unshare, 1)
-	MIPS_SYS(sys_splice, 4)
+	MIPS_SYS(sys_splice, 6)
 	MIPS_SYS(sys_sync_file_range, 7) /* 4305 */
 	MIPS_SYS(sys_tee, 4)
 	MIPS_SYS(sys_vmsplice, 4)
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Qemu-devel] [PULL trivial 08/11] misc: Fix new typos in comments and strings
  2013-07-27  7:33 [Qemu-devel] [PULL trivial 00/11] trivial patches for 2013-07-27 Michael Tokarev
                   ` (6 preceding siblings ...)
  2013-07-27  7:33 ` [Qemu-devel] [PULL trivial 07/11] linux-user: correct argument number for sys_mremap and sys_splice Michael Tokarev
@ 2013-07-27  7:33 ` Michael Tokarev
  2013-07-27  7:33 ` [Qemu-devel] [PULL trivial 09/11] qemu-options: mention C-a h in the -nographic doc Michael Tokarev
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Michael Tokarev @ 2013-07-27  7:33 UTC (permalink / raw)
  To: anthony; +Cc: qemu-trivial, Stefan Weil, Michael Tokarev, qemu-devel

From: Stefan Weil <sw@weilnetz.de>

All these typos were found by codespell.

sould -> should
emperical -> empirical
intialization -> initialization
successfuly -> successfully
gaurantee -> guarantee

Fix also another error (before before) in the same context.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 block/vhdx.h               |    2 +-
 docs/rdma.txt              |    2 +-
 hw/virtio/virtio-balloon.c |    4 ++--
 hw/xen/xen_pt.c            |    3 ++-
 migration-rdma.c           |    4 ++--
 5 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/block/vhdx.h b/block/vhdx.h
index c3b64c6..fb687ed 100644
--- a/block/vhdx.h
+++ b/block/vhdx.h
@@ -168,7 +168,7 @@ typedef struct QEMU_PACKED VHDXLogEntryHeader {
                                            vhdx_header.  If not found in
                                            vhdx_header, it is invalid */
     uint64_t    flushed_file_offset;    /* see spec for full details - this
-                                           sould be vhdx file size in bytes */
+                                           should be vhdx file size in bytes */
     uint64_t    last_file_offset;       /* size in bytes that all allocated
                                            file structures fit into */
 } VHDXLogEntryHeader;
diff --git a/docs/rdma.txt b/docs/rdma.txt
index 45d1c8a..8d1e003 100644
--- a/docs/rdma.txt
+++ b/docs/rdma.txt
@@ -199,7 +199,7 @@ Version #1 requires that all server implementations of the protocol must
 check this field and register all requests found in the array of commands located
 in the data portion and return an equal number of results in the response.
 The maximum number of repeats is hard-coded to 4096. This is a conservative
-limit based on the maximum size of a SEND message along with emperical
+limit based on the maximum size of a SEND message along with empirical
 observations on the maximum future benefit of simultaneous page registrations.
 
 The 'type' field has 12 different command values:
diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c
index 3fa72a9..337cfa5 100644
--- a/hw/virtio/virtio-balloon.c
+++ b/hw/virtio/virtio-balloon.c
@@ -53,8 +53,8 @@ static const char *balloon_stat_names[] = {
 /*
  * reset_stats - Mark all items in the stats array as unset
  *
- * This function needs to be called at device intialization and before
- * before updating to a set of newly-generated stats.  This will ensure that no
+ * This function needs to be called at device initialization and before
+ * updating to a set of newly-generated stats.  This will ensure that no
  * stale values stick around in case the guest reports a subset of the supported
  * statistics.
  */
diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c
index d7ee774..d15a729 100644
--- a/hw/xen/xen_pt.c
+++ b/hw/xen/xen_pt.c
@@ -756,7 +756,8 @@ static int xen_pt_initfn(PCIDevice *d)
 out:
     memory_listener_register(&s->memory_listener, &address_space_memory);
     memory_listener_register(&s->io_listener, &address_space_io);
-    XEN_PT_LOG(d, "Real physical device %02x:%02x.%d registered successfuly!\n",
+    XEN_PT_LOG(d,
+               "Real physical device %02x:%02x.%d registered successfully!\n",
                s->hostaddr.bus, s->hostaddr.slot, s->hostaddr.function);
 
     return 0;
diff --git a/migration-rdma.c b/migration-rdma.c
index d044830..4828738 100644
--- a/migration-rdma.c
+++ b/migration-rdma.c
@@ -2494,7 +2494,7 @@ static int qemu_rdma_close(void *opaque)
  *    @size == 0 :
  *        A 'hint' or 'advice' that means that we wish to speculatively
  *        and asynchronously unregister this memory. In this case, there is no
- *        gaurantee that the unregister will actually happen, for example,
+ *        guarantee that the unregister will actually happen, for example,
  *        if the memory is being actively transmitted. Additionally, the memory
  *        may be re-registered at any future time if a write within the same
  *        chunk was requested again, even if you attempted to unregister it
@@ -2570,7 +2570,7 @@ static size_t qemu_rdma_save_page(QEMUFile *f, void *opaque,
         qemu_rdma_signal_unregister(rdma, index, chunk, 0);
 
         /*
-         * TODO: Synchronous, gauranteed unregistration (should not occur during
+         * TODO: Synchronous, guaranteed unregistration (should not occur during
          * fast-path). Otherwise, unregisters will process on the next call to
          * qemu_rdma_drain_cq()
         if (size < 0) {
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Qemu-devel] [PULL trivial 09/11] qemu-options: mention C-a h in the -nographic doc
  2013-07-27  7:33 [Qemu-devel] [PULL trivial 00/11] trivial patches for 2013-07-27 Michael Tokarev
                   ` (7 preceding siblings ...)
  2013-07-27  7:33 ` [Qemu-devel] [PULL trivial 08/11] misc: Fix new typos in comments and strings Michael Tokarev
@ 2013-07-27  7:33 ` Michael Tokarev
  2013-07-27  7:33 ` [Qemu-devel] [PULL trivial 10/11] misc: Use g_assert_not_reached for code which is expected to be unreachable Michael Tokarev
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Michael Tokarev @ 2013-07-27  7:33 UTC (permalink / raw)
  To: anthony
  Cc: Peter Maydell, Anthony Liguori, Ramkumar Ramachandra,
	qemu-trivial, Marcelo Tosatti, Michael Tokarev,
	Markus Armbruster, qemu-devel, Stefan Hajnoczi

From: Ramkumar Ramachandra <artagnon@gmail.com>

Otherwise, a new user will be wondering how to switch between the
console and monitor.

Cc: Anthony Liguori <aliguori@us.ibm.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 qemu-options.hx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/qemu-options.hx b/qemu-options.hx
index 2dbfd42..25ecb55 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -844,7 +844,8 @@ you can totally disable graphical output so that QEMU is a simple
 command line application. The emulated serial port is redirected on
 the console and muxed with the monitor (unless redirected elsewhere
 explicitly). Therefore, you can still use QEMU to debug a Linux kernel
-with a serial console.
+with a serial console.  Use @key{C-a h} for help on switching between
+the console and monitor.
 ETEXI
 
 DEF("curses", 0, QEMU_OPTION_curses,
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Qemu-devel] [PULL trivial 10/11] misc: Use g_assert_not_reached for code which is expected to be unreachable
  2013-07-27  7:33 [Qemu-devel] [PULL trivial 00/11] trivial patches for 2013-07-27 Michael Tokarev
                   ` (8 preceding siblings ...)
  2013-07-27  7:33 ` [Qemu-devel] [PULL trivial 09/11] qemu-options: mention C-a h in the -nographic doc Michael Tokarev
@ 2013-07-27  7:33 ` Michael Tokarev
  2013-07-27  7:33 ` [Qemu-devel] [PULL trivial 11/11] target-mips: Remove assignment to a variable which is never used Michael Tokarev
  2013-07-29  7:42 ` [Qemu-devel] [PULL trivial 00/11] trivial patches for 2013-07-27 Aurelien Jarno
  11 siblings, 0 replies; 13+ messages in thread
From: Michael Tokarev @ 2013-07-27  7:33 UTC (permalink / raw)
  To: anthony; +Cc: qemu-trivial, Stefan Weil, Michael Tokarev, qemu-devel

From: Stefan Weil <sw@weilnetz.de>

The macro g_assert_not_reached is a better self documenting replacement
for assert(0) or assert(false).

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 blockdev.c                         |    2 +-
 hw/net/vmxnet3.c                   |   16 ++++++++--------
 hw/net/vmxnet_tx_pkt.c             |    2 +-
 hw/usb/hcd-ehci.c                  |    8 ++++----
 net/eth.c                          |    2 +-
 qdev-monitor.c                     |    4 ++--
 target-arm/helper.c                |    2 +-
 tests/test-qmp-input-visitor.c     |    2 +-
 tests/test-qmp-output-visitor.c    |    4 ++--
 tests/test-visitor-serialization.c |    8 ++++----
 10 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/blockdev.c b/blockdev.c
index 4534864..7879e85 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -1029,7 +1029,7 @@ static void abort_prepare(BlkTransactionState *common, Error **errp)
 
 static void abort_commit(BlkTransactionState *common)
 {
-    assert(false); /* this action never succeeds */
+    g_assert_not_reached(); /* this action never succeeds */
 }
 
 static const BdrvActionOps actions[] = {
diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c
index b39ff08..0f3c58c 100644
--- a/hw/net/vmxnet3.c
+++ b/hw/net/vmxnet3.c
@@ -528,7 +528,7 @@ vmxnet3_setup_tx_offloads(VMXNET3State *s)
         break;
 
     default:
-        assert(false);
+        g_assert_not_reached();
         return false;
     }
 
@@ -575,7 +575,7 @@ vmxnet3_on_tx_done_update_stats(VMXNET3State *s, int qidx,
             stats->ucastBytesTxOK += tot_len;
             break;
         default:
-            assert(false);
+            g_assert_not_reached();
         }
 
         if (s->offload_mode == VMXNET3_OM_TSO) {
@@ -599,7 +599,7 @@ vmxnet3_on_tx_done_update_stats(VMXNET3State *s, int qidx,
         break;
 
     default:
-        assert(false);
+        g_assert_not_reached();
     }
 }
 
@@ -634,7 +634,7 @@ vmxnet3_on_rx_done_update_stats(VMXNET3State *s,
             stats->ucastBytesRxOK += tot_len;
             break;
         default:
-            assert(false);
+            g_assert_not_reached();
         }
 
         if (tot_len > s->mtu) {
@@ -643,7 +643,7 @@ vmxnet3_on_rx_done_update_stats(VMXNET3State *s,
         }
         break;
     default:
-        assert(false);
+        g_assert_not_reached();
     }
 }
 
@@ -1106,7 +1106,7 @@ vmxnet3_io_bar0_read(void *opaque, hwaddr addr, unsigned size)
 {
     if (VMW_IS_MULTIREG_ADDR(addr, VMXNET3_REG_IMR,
                         VMXNET3_MAX_INTRS, VMXNET3_REG_ALIGN)) {
-        assert(false);
+        g_assert_not_reached();
     }
 
     VMW_CBPRN("BAR0 unknown read [%" PRIx64 "], size %d", addr, size);
@@ -1651,7 +1651,7 @@ vmxnet3_io_bar1_write(void *opaque,
     case VMXNET3_REG_ICR:
         VMW_CBPRN("Write BAR1 [VMXNET3_REG_ICR] = %" PRIx64 ", size %d",
                   val, size);
-        assert(false);
+        g_assert_not_reached();
         break;
 
     /* Event Cause Register */
@@ -1801,7 +1801,7 @@ vmxnet3_rx_filter_may_indicate(VMXNET3State *s, const void *data,
         break;
 
     default:
-        assert(false);
+        g_assert_not_reached();
     }
 
     return true;
diff --git a/hw/net/vmxnet_tx_pkt.c b/hw/net/vmxnet_tx_pkt.c
index fc01e4d..f7344c4 100644
--- a/hw/net/vmxnet_tx_pkt.c
+++ b/hw/net/vmxnet_tx_pkt.c
@@ -287,7 +287,7 @@ void vmxnet_tx_pkt_build_vheader(struct VmxnetTxPkt *pkt, bool tso_enable,
         break;
 
     default:
-        assert(false);
+        g_assert_not_reached();
     }
 
     if (csum_enable) {
diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c
index 67e4b24..010a0d0 100644
--- a/hw/usb/hcd-ehci.c
+++ b/hw/usb/hcd-ehci.c
@@ -1357,7 +1357,7 @@ static void ehci_execute_complete(EHCIQueue *q)
     default:
         /* should not be triggerable */
         fprintf(stderr, "USB invalid response %d\n", p->packet.status);
-        assert(0);
+        g_assert_not_reached();
         break;
     }
 
@@ -2142,7 +2142,7 @@ static void ehci_advance_state(EHCIState *ehci, int async)
         default:
             fprintf(stderr, "Bad state!\n");
             again = -1;
-            assert(0);
+            g_assert_not_reached();
             break;
         }
 
@@ -2206,7 +2206,7 @@ static void ehci_advance_async_state(EHCIState *ehci)
         /* this should only be due to a developer mistake */
         fprintf(stderr, "ehci: Bad asynchronous state %d. "
                 "Resetting to active\n", ehci->astate);
-        assert(0);
+        g_assert_not_reached();
     }
 }
 
@@ -2256,7 +2256,7 @@ static void ehci_advance_periodic_state(EHCIState *ehci)
         /* this should only be due to a developer mistake */
         fprintf(stderr, "ehci: Bad periodic state %d. "
                 "Resetting to active\n", ehci->pstate);
-        assert(0);
+        g_assert_not_reached();
     }
 }
 
diff --git a/net/eth.c b/net/eth.c
index 1d7494d..7c61132 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -73,7 +73,7 @@ eth_get_gso_type(uint16_t l3_proto, uint8_t *l3_hdr, uint8_t l4proto)
     }
 
     /* Unsupported offload */
-    assert(false);
+    g_assert_not_reached();
 
     return VIRTIO_NET_HDR_GSO_NONE | ecn_state;
 }
diff --git a/qdev-monitor.c b/qdev-monitor.c
index e54dbc2..e5adf6c 100644
--- a/qdev-monitor.c
+++ b/qdev-monitor.c
@@ -360,7 +360,7 @@ static BusState *qbus_find(const char *path)
 
         /* find device */
         if (sscanf(path+pos, "%127[^/]%n", elem, &len) != 1) {
-            assert(0);
+            g_assert_not_reached();
             elem[0] = len = 0;
         }
         pos += len;
@@ -397,7 +397,7 @@ static BusState *qbus_find(const char *path)
 
         /* find bus */
         if (sscanf(path+pos, "%127[^/]%n", elem, &len) != 1) {
-            assert(0);
+            g_assert_not_reached();
             elem[0] = len = 0;
         }
         pos += len;
diff --git a/target-arm/helper.c b/target-arm/helper.c
index b0c3ca1..4968391 100644
--- a/target-arm/helper.c
+++ b/target-arm/helper.c
@@ -1653,7 +1653,7 @@ void define_one_arm_cp_reg_with_opaque(ARMCPU *cpu,
                                 "was %s, now %s\n", r2->cp, 32 + 32 * is64,
                                 r2->crn, r2->crm, r2->opc1, r2->opc2,
                                 oldreg->name, r2->name);
-                        assert(0);
+                        g_assert_not_reached();
                     }
                 }
                 g_hash_table_insert(cpu->cp_regs, key, r2);
diff --git a/tests/test-qmp-input-visitor.c b/tests/test-qmp-input-visitor.c
index 2741eef..0beb8fb 100644
--- a/tests/test-qmp-input-visitor.c
+++ b/tests/test-qmp-input-visitor.c
@@ -394,7 +394,7 @@ static void test_native_list_integer_helper(TestInputVisitorData *data,
         break;
     }
     default:
-        g_assert(false);
+        g_assert_not_reached();
     }
 
     g_string_free(gstr_union, true);
diff --git a/tests/test-qmp-output-visitor.c b/tests/test-qmp-output-visitor.c
index b2fa9a7..e073d83 100644
--- a/tests/test-qmp-output-visitor.c
+++ b/tests/test-qmp-output-visitor.c
@@ -559,7 +559,7 @@ static void init_native_list(UserDefNativeListUnion *cvalue)
         break;
     }
     default:
-        g_assert(false);
+        g_assert_not_reached();
     }
 }
 
@@ -645,7 +645,7 @@ static void check_native_list(QObject *qobj,
         }
         break;
     default:
-        g_assert(false);
+        g_assert_not_reached();
     }
     QDECREF(qlist);
 }
diff --git a/tests/test-visitor-serialization.c b/tests/test-visitor-serialization.c
index ee7916b..9aaa587 100644
--- a/tests/test-visitor-serialization.c
+++ b/tests/test-visitor-serialization.c
@@ -136,7 +136,7 @@ static void visit_primitive_type(Visitor *v, void **native, Error **errp)
         visit_type_int64(v, &pt->value.s64, NULL, errp);
         break;
     case PTYPE_EOL:
-        g_assert(false);
+        g_assert_not_reached();
     }
 }
 
@@ -181,7 +181,7 @@ static void visit_primitive_list(Visitor *v, void **native, Error **errp)
         visit_type_uint64List(v, &pl->value.u64_integers, NULL, errp);
         break;
     default:
-        g_assert(false);
+        g_assert_not_reached();
     }
 }
 
@@ -500,7 +500,7 @@ static void test_primitive_lists(gconstpointer opaque)
             break;
         }
         default:
-            g_assert(0);
+            g_assert_not_reached();
         }
     }
 
@@ -656,7 +656,7 @@ static void test_primitive_lists(gconstpointer opaque)
             break;
         }
         default:
-            g_assert(0);
+            g_assert_not_reached();
         }
         i++;
     } while (cur_head);
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Qemu-devel] [PULL trivial 11/11] target-mips: Remove assignment to a variable which is never used
  2013-07-27  7:33 [Qemu-devel] [PULL trivial 00/11] trivial patches for 2013-07-27 Michael Tokarev
                   ` (9 preceding siblings ...)
  2013-07-27  7:33 ` [Qemu-devel] [PULL trivial 10/11] misc: Use g_assert_not_reached for code which is expected to be unreachable Michael Tokarev
@ 2013-07-27  7:33 ` Michael Tokarev
  2013-07-29  7:42 ` [Qemu-devel] [PULL trivial 00/11] trivial patches for 2013-07-27 Aurelien Jarno
  11 siblings, 0 replies; 13+ messages in thread
From: Michael Tokarev @ 2013-07-27  7:33 UTC (permalink / raw)
  To: anthony; +Cc: qemu-trivial, Stefan Weil, Michael Tokarev, qemu-devel

From: Stefan Weil <sw@weilnetz.de>

This assignment causes a compiler warning for compilations with the compiler
option -Wunused-but-set-variable (which is included with -Wextra).

Removing it allows using -Wextra for QEMU code without suppressing too many
extra warnings.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 target-mips/op_helper.c |    1 -
 1 file changed, 1 deletion(-)

diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c
index 5cf1c3f..b828375 100644
--- a/target-mips/op_helper.c
+++ b/target-mips/op_helper.c
@@ -1735,7 +1735,6 @@ target_ulong helper_evpe(CPUMIPSState *env)
 void helper_fork(target_ulong arg1, target_ulong arg2)
 {
     // arg1 = rt, arg2 = rs
-    arg1 = 0;
     // TODO: store to TC register
 }
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [PULL trivial 00/11] trivial patches for 2013-07-27
  2013-07-27  7:33 [Qemu-devel] [PULL trivial 00/11] trivial patches for 2013-07-27 Michael Tokarev
                   ` (10 preceding siblings ...)
  2013-07-27  7:33 ` [Qemu-devel] [PULL trivial 11/11] target-mips: Remove assignment to a variable which is never used Michael Tokarev
@ 2013-07-29  7:42 ` Aurelien Jarno
  11 siblings, 0 replies; 13+ messages in thread
From: Aurelien Jarno @ 2013-07-29  7:42 UTC (permalink / raw)
  To: Michael Tokarev; +Cc: qemu-trivial, qemu-devel, anthony

On Sat, Jul 27, 2013 at 11:33:15AM +0400, Michael Tokarev wrote:
> We collected a few more trivial patches this week, including a compile
> failure fix for 32bit builds by Stefan Weil.
> 
> Please pull.
> 
> The following changes since commit 200a06397f5d3e982028fd78b25b420507ade021:
> 
>   Merge remote-tracking branch 'afaerber/tags/qom-cpu-for-anthony' into staging (2013-07-26 17:53:19 -0500)
> 
> are available in the git repository at:
> 
> 
>   git://git.corpit.ru/qemu.git trivial-patches
> 
> for you to fetch changes up to 6c86f405efd6532b58ad1b607cc9f11e856ef5ca:
> 
>   target-mips: Remove assignment to a variable which is never used (2013-07-27 11:22:54 +0400)
> 
> ----------------------------------------------------------------
> Liu Ping Fan (1):
>       timer: make timers_state static
> 
> Petar Jovanovic (1):
>       linux-user: correct argument number for sys_mremap and sys_splice
> 
> Ramkumar Ramachandra (1):
>       qemu-options: mention C-a h in the -nographic doc
> 
> Stefan Weil (8):
>       aes: Remove unused code (NDEBUG, u16)
>       hw/9pfs: Fix potential memory leak and avoid reuse of freed memory
>       exec: Remove env from list of poisoned names
>       watchdog: Remove break after exit
>       PPC: dbdma: macio: Fix format specifiers (build regression)
>       misc: Fix new typos in comments and strings
>       misc: Use g_assert_not_reached for code which is expected to be unreachable
>       target-mips: Remove assignment to a variable which is never used
> 
>  block/vhdx.h                       |    2 +-
>  blockdev.c                         |    2 +-
>  cpus.c                             |    2 +-
>  docs/rdma.txt                      |    2 +-
>  hw/9pfs/virtio-9p-proxy.c          |    2 ++
>  hw/ide/macio.c                     |    9 +++++----
>  hw/net/vmxnet3.c                   |   16 ++++++++--------
>  hw/net/vmxnet_tx_pkt.c             |    2 +-
>  hw/usb/hcd-ehci.c                  |    8 ++++----
>  hw/virtio/virtio-balloon.c         |    4 ++--
>  hw/watchdog/watchdog.c             |    1 -
>  hw/xen/xen_pt.c                    |    3 ++-
>  include/exec/poison.h              |    1 -
>  linux-user/main.c                  |    4 ++--
>  migration-rdma.c                   |    4 ++--
>  net/eth.c                          |    2 +-
>  qdev-monitor.c                     |    4 ++--
>  qemu-options.hx                    |    3 ++-
>  target-arm/helper.c                |    2 +-
>  target-mips/op_helper.c            |    1 -
>  tests/test-qmp-input-visitor.c     |    2 +-
>  tests/test-qmp-output-visitor.c    |    4 ++--
>  tests/test-visitor-serialization.c |    8 ++++----
>  util/aes.c                         |    5 -----
>  24 files changed, 45 insertions(+), 48 deletions(-)
> 

Thanks, pulled.

-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2013-07-29  7:42 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-27  7:33 [Qemu-devel] [PULL trivial 00/11] trivial patches for 2013-07-27 Michael Tokarev
2013-07-27  7:33 ` [Qemu-devel] [PULL trivial 01/11] aes: Remove unused code (NDEBUG, u16) Michael Tokarev
2013-07-27  7:33 ` [Qemu-devel] [PULL trivial 02/11] timer: make timers_state static Michael Tokarev
2013-07-27  7:33 ` [Qemu-devel] [PULL trivial 03/11] hw/9pfs: Fix potential memory leak and avoid reuse of freed memory Michael Tokarev
2013-07-27  7:33 ` [Qemu-devel] [PULL trivial 04/11] exec: Remove env from list of poisoned names Michael Tokarev
2013-07-27  7:33 ` [Qemu-devel] [PULL trivial 05/11] watchdog: Remove break after exit Michael Tokarev
2013-07-27  7:33 ` [Qemu-devel] [PULL trivial 06/11] PPC: dbdma: macio: Fix format specifiers (build regression) Michael Tokarev
2013-07-27  7:33 ` [Qemu-devel] [PULL trivial 07/11] linux-user: correct argument number for sys_mremap and sys_splice Michael Tokarev
2013-07-27  7:33 ` [Qemu-devel] [PULL trivial 08/11] misc: Fix new typos in comments and strings Michael Tokarev
2013-07-27  7:33 ` [Qemu-devel] [PULL trivial 09/11] qemu-options: mention C-a h in the -nographic doc Michael Tokarev
2013-07-27  7:33 ` [Qemu-devel] [PULL trivial 10/11] misc: Use g_assert_not_reached for code which is expected to be unreachable Michael Tokarev
2013-07-27  7:33 ` [Qemu-devel] [PULL trivial 11/11] target-mips: Remove assignment to a variable which is never used Michael Tokarev
2013-07-29  7:42 ` [Qemu-devel] [PULL trivial 00/11] trivial patches for 2013-07-27 Aurelien Jarno

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.