All of lore.kernel.org
 help / color / mirror / Atom feed
* [PULL 00/44] Trivial branch for 5.2 patches
@ 2020-09-01 14:09 Laurent Vivier
  2020-09-01 14:09 ` [PULL 01/44] hw/register: Document register_init_block @memory_size Laurent Vivier
                   ` (43 more replies)
  0 siblings, 44 replies; 45+ messages in thread
From: Laurent Vivier @ 2020-09-01 14:09 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Laurent Vivier

The following changes since commit 39335fab59e11cfda9b7cf63929825db2dd3a3e0:

  Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-5.2-pull-=
request' into staging (2020-08-28 22:30:11 +0100)

are available in the Git repository at:

  git://github.com/vivier/qemu.git tags/trivial-branch-for-5.2-pull-request

for you to fetch changes up to 1eef4ba6be30f8b95c8cda1bcb50a176d680a34d:

  docs/system: Fix grammar in documentation (2020-09-01 12:09:30 +0200)

----------------------------------------------------------------
Pull request trivial patches 20200901

----------------------------------------------------------------

Chen Qun (10):
  hw/arm/virt-acpi-build:Remove dead assignment in build_madt()
  hw/arm/omap1:Remove redundant statement in omap_clkdsp_read()
  target/arm/translate-a64:Remove dead assignment in
    handle_scalar_simd_shli()
  target/arm/translate-a64:Remove redundant statement in
    disas_simd_two_reg_misc_fp16()
  hw/virtio/vhost-user:Remove dead assignment in scrub_shadow_regions()
  hw/net/virtio-net:Remove redundant statement in
    virtio_net_rsc_tcp_ctrl_check()
  vfio/platform: Remove dead assignment in vfio_intp_interrupt()
  usb/bus: Remove dead assignment in usb_get_fw_dev_path()
  hw/intc: fix default registers value in exynos4210_combiner_read()
  hw/display/vga:Remove redundant statement in vga_draw_graphic()

Greg Kurz (1):
  mailmap: Add entry for Greg Kurz

Han Han (1):
  docs: Fix broken links

Kenta Ishiguro (1):
  hw/i386/kvm/ioapic.c: fix typo in error message

Liao Pingfang (8):
  target/arm/kvm: Remove superfluous break
  target/ppc: Remove superfluous breaks
  scsi: Remove superfluous breaks
  vnc: Remove the superfluous break
  block/vmdk: Remove superfluous breaks
  hw: Remove superfluous breaks
  target/sh4: Remove superfluous breaks
  target/cris: Remove superfluous breaks

Mike Gelfand (1):
  linux-user: Add strace support for printing OFD fcntl operations

Philippe Mathieu-Daud=C3=A9 (17):
  hw/register: Document register_init_block @memory_size
  hw/isa/isa-superio: Fix IDE controller realization
  stubs/cmos: Use correct include
  hw/core/sysbus: Fix a typo
  hw/core/sysbus: Assert memory region index is in range
  Revert "mailmap: Update philmd email address"
  .mailmap: Update Paul Burton email address
  hw/i2c: Fix typo in description
  util/qemu-timer: Fix typo in description
  util/vfio-helpers: Fix typo in description
  hw/ide/core: Trivial typo fix
  hw/ide/ahci: Replace magic '512' value by BDRV_SECTOR_SIZE
  hw/ide/atapi: Replace magic '512' value by BDRV_SECTOR_SIZE
  hw/ide/pci: Replace magic '512' value by BDRV_SECTOR_SIZE
  hw/scsi/scsi-disk: Replace magic '512' value by BDRV_SECTOR_SIZE
  hw/net/xilinx_axienet: Remove unused code
  util/vfio-helpers: Unify trace-events size format

Stefan Weil (2):
  main-loop: Fix comment
  docs/system: Fix grammar in documentation

Thomas Huth (2):
  hw/net/can: Add missing fallthrough statements
  docs/system/target-avr: Improve the AVR docs and add to MAINTAINERS

Tianjia Zhang (1):
  qemu-options.hx: Fix typo for netdev documentation

 .mailmap                        |  9 ++++---
 MAINTAINERS                     |  1 +
 block/vmdk.c                    |  3 ---
 docs/amd-memory-encryption.txt  |  4 +--
 docs/pvrdma.txt                 |  2 +-
 docs/system/build-platforms.rst |  6 ++---
 docs/system/target-avr.rst      | 47 ++++++++++++++++++++-------------
 hw/arm/omap1.c                  |  1 -
 hw/arm/virt-acpi-build.c        |  3 +--
 hw/block/pflash_cfi01.c         |  1 -
 hw/core/sysbus.c                |  3 ++-
 hw/display/cirrus_vga.c         |  1 -
 hw/display/qxl-logger.c         |  2 --
 hw/display/vga.c                |  1 -
 hw/gpio/max7310.c               |  3 ---
 hw/i386/intel_iommu.c           |  1 -
 hw/i386/kvm/ioapic.c            |  2 +-
 hw/ide/ahci.c                   |  5 ++--
 hw/ide/atapi.c                  |  8 +++---
 hw/ide/core.c                   |  2 +-
 hw/ide/pci.c                    |  2 +-
 hw/input/pxa2xx_keypad.c        | 10 -------
 hw/intc/armv7m_nvic.c           |  1 -
 hw/intc/exynos4210_combiner.c   |  1 -
 hw/isa/isa-superio.c            |  2 +-
 hw/net/can/can_sja1000.c        |  2 ++
 hw/net/lan9118.c                |  2 --
 hw/net/virtio-net.c             |  1 -
 hw/net/xilinx_axienet.c         | 23 ----------------
 hw/scsi/scsi-disk.c             | 44 +++++++++++++++---------------
 hw/usb/bus.c                    |  4 +--
 hw/usb/ccid-card-emulated.c     |  1 -
 hw/vfio/platform.c              |  2 +-
 hw/virtio/vhost-user.c          |  2 +-
 include/hw/i2c/i2c.h            |  2 +-
 include/hw/register.h           |  1 +
 include/qemu/main-loop.h        |  2 +-
 linux-user/strace.c             | 12 +++++++++
 qemu-options.hx                 |  2 +-
 scsi/utils.c                    |  4 ---
 stubs/cmos.c                    |  2 +-
 target/arm/kvm64.c              |  1 -
 target/arm/translate-a64.c      |  7 ++---
 target/cris/translate.c         |  7 +++--
 target/cris/translate_v10.c.inc |  2 --
 target/ppc/misc_helper.c        |  5 ----
 target/sh4/translate.c          |  3 ---
 ui/vnc-enc-tight.c              |  1 -
 util/qemu-timer.c               |  2 +-
 util/trace-events               |  6 ++---
 util/vfio-helpers.c             |  4 +--
 51 files changed, 112 insertions(+), 153 deletions(-)

--=20
2.26.2



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

* [PULL 01/44] hw/register: Document register_init_block @memory_size
  2020-09-01 14:09 [PULL 00/44] Trivial branch for 5.2 patches Laurent Vivier
@ 2020-09-01 14:09 ` Laurent Vivier
  2020-09-01 14:09 ` [PULL 02/44] target/arm/kvm: Remove superfluous break Laurent Vivier
                   ` (42 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Laurent Vivier @ 2020-09-01 14:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Alistair Francis, Laurent Vivier,
	Philippe Mathieu-Daudé

From: Philippe Mathieu-Daudé <f4bug@amsat.org>

Document the 'memory_size' argument of register_init_block().

Fixes: a74229597e ("register: Add block initialise helper")
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20200707062308.4531-1-f4bug@amsat.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 include/hw/register.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/hw/register.h b/include/hw/register.h
index 5d2c565ae02e..fdac5e69b545 100644
--- a/include/hw/register.h
+++ b/include/hw/register.h
@@ -181,6 +181,7 @@ uint64_t register_read_memory(void *opaque, hwaddr addr, unsigned size);
  * @data: Array to use for register data, must already be allocated
  * @ops: Memory region ops to access registers.
  * @debug enabled: turn on/off verbose debug information
+ * @memory_size: Size of the memory region
  * returns: A structure containing all of the registers and an initialized
  *          memory region (r_array->mem) the caller should add to a container.
  */
-- 
2.26.2



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

* [PULL 02/44] target/arm/kvm: Remove superfluous break
  2020-09-01 14:09 [PULL 00/44] Trivial branch for 5.2 patches Laurent Vivier
  2020-09-01 14:09 ` [PULL 01/44] hw/register: Document register_init_block @memory_size Laurent Vivier
@ 2020-09-01 14:09 ` Laurent Vivier
  2020-09-01 14:09 ` [PULL 03/44] target/ppc: Remove superfluous breaks Laurent Vivier
                   ` (41 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Laurent Vivier @ 2020-09-01 14:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: Yi Wang, Thomas Huth, qemu-trivial, Laurent Vivier,
	Philippe Mathieu-Daudé,
	Liao Pingfang

From: Liao Pingfang <liao.pingfang@zte.com.cn>

Remove superfluous break.

Signed-off-by: Liao Pingfang <liao.pingfang@zte.com.cn>
Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <1594630986-36148-1-git-send-email-wang.yi59@zte.com.cn>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 target/arm/kvm64.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/target/arm/kvm64.c b/target/arm/kvm64.c
index 116923790550..ef1e96028500 100644
--- a/target/arm/kvm64.c
+++ b/target/arm/kvm64.c
@@ -330,7 +330,6 @@ int kvm_arch_remove_hw_breakpoint(target_ulong addr,
     switch (type) {
     case GDB_BREAKPOINT_HW:
         return delete_hw_breakpoint(addr);
-        break;
     case GDB_WATCHPOINT_READ:
     case GDB_WATCHPOINT_WRITE:
     case GDB_WATCHPOINT_ACCESS:
-- 
2.26.2



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

* [PULL 03/44] target/ppc: Remove superfluous breaks
  2020-09-01 14:09 [PULL 00/44] Trivial branch for 5.2 patches Laurent Vivier
  2020-09-01 14:09 ` [PULL 01/44] hw/register: Document register_init_block @memory_size Laurent Vivier
  2020-09-01 14:09 ` [PULL 02/44] target/arm/kvm: Remove superfluous break Laurent Vivier
@ 2020-09-01 14:09 ` Laurent Vivier
  2020-09-01 14:09 ` [PULL 04/44] scsi: " Laurent Vivier
                   ` (40 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Laurent Vivier @ 2020-09-01 14:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: Yi Wang, Thomas Huth, qemu-trivial, Laurent Vivier,
	Philippe Mathieu-Daudé,
	Liao Pingfang

From: Liao Pingfang <liao.pingfang@zte.com.cn>

Remove superfluous breaks, as there is a "return" before them.

Signed-off-by: Liao Pingfang <liao.pingfang@zte.com.cn>
Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <1594631025-36219-1-git-send-email-wang.yi59@zte.com.cn>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 target/ppc/misc_helper.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/target/ppc/misc_helper.c b/target/ppc/misc_helper.c
index 55b68d1246e4..e43a3b468667 100644
--- a/target/ppc/misc_helper.c
+++ b/target/ppc/misc_helper.c
@@ -234,25 +234,20 @@ target_ulong helper_clcs(CPUPPCState *env, uint32_t arg)
     case 0x0CUL:
         /* Instruction cache line size */
         return env->icache_line_size;
-        break;
     case 0x0DUL:
         /* Data cache line size */
         return env->dcache_line_size;
-        break;
     case 0x0EUL:
         /* Minimum cache line size */
         return (env->icache_line_size < env->dcache_line_size) ?
             env->icache_line_size : env->dcache_line_size;
-        break;
     case 0x0FUL:
         /* Maximum cache line size */
         return (env->icache_line_size > env->dcache_line_size) ?
             env->icache_line_size : env->dcache_line_size;
-        break;
     default:
         /* Undefined */
         return 0;
-        break;
     }
 }
 
-- 
2.26.2



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

* [PULL 04/44] scsi: Remove superfluous breaks
  2020-09-01 14:09 [PULL 00/44] Trivial branch for 5.2 patches Laurent Vivier
                   ` (2 preceding siblings ...)
  2020-09-01 14:09 ` [PULL 03/44] target/ppc: Remove superfluous breaks Laurent Vivier
@ 2020-09-01 14:09 ` Laurent Vivier
  2020-09-01 14:09 ` [PULL 05/44] vnc: Remove the superfluous break Laurent Vivier
                   ` (39 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Laurent Vivier @ 2020-09-01 14:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: Yi Wang, Thomas Huth, qemu-trivial, Laurent Vivier,
	Philippe Mathieu-Daudé,
	Liao Pingfang

From: Liao Pingfang <liao.pingfang@zte.com.cn>

Remove superfluous breaks, as there is a "return" before them.

Signed-off-by: Liao Pingfang <liao.pingfang@zte.com.cn>
Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <1594631062-36341-1-git-send-email-wang.yi59@zte.com.cn>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 scsi/utils.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/scsi/utils.c b/scsi/utils.c
index c50e81fdb87f..b37c28301489 100644
--- a/scsi/utils.c
+++ b/scsi/utils.c
@@ -32,17 +32,13 @@ uint32_t scsi_cdb_xfer(uint8_t *buf)
     switch (buf[0] >> 5) {
     case 0:
         return buf[4];
-        break;
     case 1:
     case 2:
         return lduw_be_p(&buf[7]);
-        break;
     case 4:
         return ldl_be_p(&buf[10]) & 0xffffffffULL;
-        break;
     case 5:
         return ldl_be_p(&buf[6]) & 0xffffffffULL;
-        break;
     default:
         return -1;
     }
-- 
2.26.2



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

* [PULL 05/44] vnc: Remove the superfluous break
  2020-09-01 14:09 [PULL 00/44] Trivial branch for 5.2 patches Laurent Vivier
                   ` (3 preceding siblings ...)
  2020-09-01 14:09 ` [PULL 04/44] scsi: " Laurent Vivier
@ 2020-09-01 14:09 ` Laurent Vivier
  2020-09-01 14:09 ` [PULL 06/44] block/vmdk: Remove superfluous breaks Laurent Vivier
                   ` (38 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Laurent Vivier @ 2020-09-01 14:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: Yi Wang, Thomas Huth, Juan Quintela, qemu-trivial,
	Laurent Vivier, Philippe Mathieu-Daudé,
	Liao Pingfang

From: Liao Pingfang <liao.pingfang@zte.com.cn>

Remove the superfluous break, as there is a "return" before.

Signed-off-by: Liao Pingfang <liao.pingfang@zte.com.cn>a
Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Message-Id: <1594631086-36509-1-git-send-email-wang.yi59@zte.com.cn>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 ui/vnc-enc-tight.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/ui/vnc-enc-tight.c b/ui/vnc-enc-tight.c
index 1e0851826a84..cebd35841a92 100644
--- a/ui/vnc-enc-tight.c
+++ b/ui/vnc-enc-tight.c
@@ -1125,7 +1125,6 @@ static int send_palette_rect(VncState *vs, int x, int y,
     }
     default:
         return -1; /* No palette for 8bits colors */
-        break;
     }
     bytes = w * h;
     vs->tight->tight.offset = bytes;
-- 
2.26.2



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

* [PULL 06/44] block/vmdk: Remove superfluous breaks
  2020-09-01 14:09 [PULL 00/44] Trivial branch for 5.2 patches Laurent Vivier
                   ` (4 preceding siblings ...)
  2020-09-01 14:09 ` [PULL 05/44] vnc: Remove the superfluous break Laurent Vivier
@ 2020-09-01 14:09 ` Laurent Vivier
  2020-09-01 14:09 ` [PULL 07/44] hw: " Laurent Vivier
                   ` (37 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Laurent Vivier @ 2020-09-01 14:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: Yi Wang, Thomas Huth, qemu-trivial, Laurent Vivier,
	Philippe Mathieu-Daudé,
	Liao Pingfang

From: Liao Pingfang <liao.pingfang@zte.com.cn>

Remove superfluous breaks, as there is a "return" before them.

Signed-off-by: Liao Pingfang <liao.pingfang@zte.com.cn>
Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <1594631107-36574-1-git-send-email-wang.yi59@zte.com.cn>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 block/vmdk.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/block/vmdk.c b/block/vmdk.c
index bf9df5ce92ed..d90855446af4 100644
--- a/block/vmdk.c
+++ b/block/vmdk.c
@@ -1053,14 +1053,11 @@ static int vmdk_open_sparse(BlockDriverState *bs, BdrvChild *file, int flags,
     switch (magic) {
         case VMDK3_MAGIC:
             return vmdk_open_vmfs_sparse(bs, file, flags, errp);
-            break;
         case VMDK4_MAGIC:
             return vmdk_open_vmdk4(bs, file, flags, options, errp);
-            break;
         default:
             error_setg(errp, "Image not in VMDK format");
             return -EINVAL;
-            break;
     }
 }
 
-- 
2.26.2



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

* [PULL 07/44] hw: Remove superfluous breaks
  2020-09-01 14:09 [PULL 00/44] Trivial branch for 5.2 patches Laurent Vivier
                   ` (5 preceding siblings ...)
  2020-09-01 14:09 ` [PULL 06/44] block/vmdk: Remove superfluous breaks Laurent Vivier
@ 2020-09-01 14:09 ` Laurent Vivier
  2020-09-01 14:09 ` [PULL 08/44] target/sh4: " Laurent Vivier
                   ` (36 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Laurent Vivier @ 2020-09-01 14:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: Yi Wang, Thomas Huth, qemu-trivial, Laurent Vivier,
	Philippe Mathieu-Daudé,
	Liao Pingfang

From: Liao Pingfang <liao.pingfang@zte.com.cn>

Remove superfluous breaks, as there is a "return" before them.

Signed-off-by: Liao Pingfang <liao.pingfang@zte.com.cn>
Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <1594631126-36631-1-git-send-email-wang.yi59@zte.com.cn>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/block/pflash_cfi01.c     |  1 -
 hw/display/cirrus_vga.c     |  1 -
 hw/display/qxl-logger.c     |  2 --
 hw/gpio/max7310.c           |  3 ---
 hw/i386/intel_iommu.c       |  1 -
 hw/input/pxa2xx_keypad.c    | 10 ----------
 hw/intc/armv7m_nvic.c       |  1 -
 hw/net/lan9118.c            |  2 --
 hw/usb/ccid-card-emulated.c |  1 -
 9 files changed, 22 deletions(-)

diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c
index 8ab1d66310b4..f0fcd63f84e8 100644
--- a/hw/block/pflash_cfi01.c
+++ b/hw/block/pflash_cfi01.c
@@ -213,7 +213,6 @@ static uint32_t pflash_devid_query(PFlashCFI01 *pfl, hwaddr offset)
     default:
         trace_pflash_device_info(offset);
         return 0;
-        break;
     }
     /* Replicate responses for each device in bank. */
     if (pfl->device_width < pfl->bank_width) {
diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c
index 212d6f5e6145..02d9ed0bd465 100644
--- a/hw/display/cirrus_vga.c
+++ b/hw/display/cirrus_vga.c
@@ -1637,7 +1637,6 @@ static int cirrus_vga_read_cr(CirrusVGAState * s, unsigned reg_index)
 	return s->vga.cr[s->vga.cr_index];
     case 0x26:			// Attribute Controller Index Readback (R)
 	return s->vga.ar_index & 0x3f;
-	break;
     default:
         qemu_log_mask(LOG_GUEST_ERROR,
                       "cirrus: inport cr_index 0x%02x\n", reg_index);
diff --git a/hw/display/qxl-logger.c b/hw/display/qxl-logger.c
index 2ec6d8fa3d6c..c15175bce322 100644
--- a/hw/display/qxl-logger.c
+++ b/hw/display/qxl-logger.c
@@ -161,7 +161,6 @@ static int qxl_log_cmd_draw(PCIQXLDevice *qxl, QXLDrawable *draw, int group_id)
     switch (draw->type) {
     case QXL_DRAW_COPY:
         return qxl_log_cmd_draw_copy(qxl, &draw->u.copy, group_id);
-        break;
     }
     return 0;
 }
@@ -180,7 +179,6 @@ static int qxl_log_cmd_draw_compat(PCIQXLDevice *qxl, QXLCompatDrawable *draw,
     switch (draw->type) {
     case QXL_DRAW_COPY:
         return qxl_log_cmd_draw_copy(qxl, &draw->u.copy, group_id);
-        break;
     }
     return 0;
 }
diff --git a/hw/gpio/max7310.c b/hw/gpio/max7310.c
index bebb4030d276..4f78774dc8f2 100644
--- a/hw/gpio/max7310.c
+++ b/hw/gpio/max7310.c
@@ -51,11 +51,9 @@ static uint8_t max7310_rx(I2CSlave *i2c)
     switch (s->command) {
     case 0x00:	/* Input port */
         return s->level ^ s->polarity;
-        break;
 
     case 0x01:	/* Output port */
         return s->level & ~s->direction;
-        break;
 
     case 0x02:	/* Polarity inversion */
         return s->polarity;
@@ -65,7 +63,6 @@ static uint8_t max7310_rx(I2CSlave *i2c)
 
     case 0x04:	/* Timeout */
         return s->status;
-        break;
 
     case 0xff:	/* Reserved */
         return 0xff;
diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
index 5284bb68b6e4..0d7c4303b4bc 100644
--- a/hw/i386/intel_iommu.c
+++ b/hw/i386/intel_iommu.c
@@ -3168,7 +3168,6 @@ static int vtd_irte_get(IntelIOMMUState *iommu, uint16_t index,
                               index, entry->irte.sid_vtype);
             /* Take this as verification failure. */
             return -VTD_FR_IR_SID_ERR;
-            break;
         }
     }
 
diff --git a/hw/input/pxa2xx_keypad.c b/hw/input/pxa2xx_keypad.c
index 62aa6f6b15a0..7f2f739fb335 100644
--- a/hw/input/pxa2xx_keypad.c
+++ b/hw/input/pxa2xx_keypad.c
@@ -192,10 +192,8 @@ static uint64_t pxa2xx_keypad_read(void *opaque, hwaddr offset,
             s->kpc &= ~(KPC_DI);
         qemu_irq_lower(s->irq);
         return tmp;
-        break;
     case KPDK:
         return s->kpdk;
-        break;
     case KPREC:
         tmp = s->kprec;
         if(tmp & KPREC_OF1)
@@ -207,31 +205,23 @@ static uint64_t pxa2xx_keypad_read(void *opaque, hwaddr offset,
         if(tmp & KPREC_UF0)
             s->kprec &= ~(KPREC_UF0);
         return tmp;
-        break;
     case KPMK:
         tmp = s->kpmk;
         if(tmp & KPMK_MKP)
             s->kpmk &= ~(KPMK_MKP);
         return tmp;
-        break;
     case KPAS:
         return s->kpas;
-        break;
     case KPASMKP0:
         return s->kpasmkp[0];
-        break;
     case KPASMKP1:
         return s->kpasmkp[1];
-        break;
     case KPASMKP2:
         return s->kpasmkp[2];
-        break;
     case KPASMKP3:
         return s->kpasmkp[3];
-        break;
     case KPKDI:
         return s->kpkdi;
-        break;
     default:
         qemu_log_mask(LOG_GUEST_ERROR,
                       "%s: Bad read offset 0x%"HWADDR_PRIx"\n",
diff --git a/hw/intc/armv7m_nvic.c b/hw/intc/armv7m_nvic.c
index 277a98b87b91..7876c1ba07ec 100644
--- a/hw/intc/armv7m_nvic.c
+++ b/hw/intc/armv7m_nvic.c
@@ -1290,7 +1290,6 @@ static uint32_t nvic_readl(NVICState *s, uint32_t offset, MemTxAttrs attrs)
     case 0xd90: /* MPU_TYPE */
         /* Unified MPU; if the MPU is not present this value is zero */
         return cpu->pmsav7_dregion << 8;
-        break;
     case 0xd94: /* MPU_CTRL */
         return cpu->env.v7m.mpu_ctrl[attrs.secure];
     case 0xd98: /* MPU_RNR */
diff --git a/hw/net/lan9118.c b/hw/net/lan9118.c
index 8e2a432179cb..e35f00fb9fea 100644
--- a/hw/net/lan9118.c
+++ b/hw/net/lan9118.c
@@ -931,10 +931,8 @@ static uint32_t do_mac_read(lan9118_state *s, int reg)
                | (s->conf.macaddr.a[2] << 16) | (s->conf.macaddr.a[3] << 24);
     case MAC_HASHH:
         return s->mac_hashh;
-        break;
     case MAC_HASHL:
         return s->mac_hashl;
-        break;
     case MAC_MII_ACC:
         return s->mac_mii_acc;
     case MAC_MII_DATA:
diff --git a/hw/usb/ccid-card-emulated.c b/hw/usb/ccid-card-emulated.c
index 7d6105ef34d5..0f1afd66be1c 100644
--- a/hw/usb/ccid-card-emulated.c
+++ b/hw/usb/ccid-card-emulated.c
@@ -350,7 +350,6 @@ static void *event_thread(void *arg)
         case VEVENT_LAST: /* quit */
             vevent_delete(event);
             return NULL;
-            break;
         default:
             break;
         }
-- 
2.26.2



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

* [PULL 08/44] target/sh4: Remove superfluous breaks
  2020-09-01 14:09 [PULL 00/44] Trivial branch for 5.2 patches Laurent Vivier
                   ` (6 preceding siblings ...)
  2020-09-01 14:09 ` [PULL 07/44] hw: " Laurent Vivier
@ 2020-09-01 14:09 ` Laurent Vivier
  2020-09-01 14:09 ` [PULL 09/44] target/cris: " Laurent Vivier
                   ` (35 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Laurent Vivier @ 2020-09-01 14:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: Yi Wang, Thomas Huth, qemu-trivial, Laurent Vivier,
	Philippe Mathieu-Daudé,
	Liao Pingfang

From: Liao Pingfang <liao.pingfang@zte.com.cn>

Remove superfluous breaks, as there is a "return" before them.

Signed-off-by: Liao Pingfang <liao.pingfang@zte.com.cn>
Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <1594631142-36745-1-git-send-email-wang.yi59@zte.com.cn>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 target/sh4/translate.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/target/sh4/translate.c b/target/sh4/translate.c
index 6192d83e8c66..60c863d9e1b0 100644
--- a/target/sh4/translate.c
+++ b/target/sh4/translate.c
@@ -1542,7 +1542,6 @@ static void _decode_opc(DisasContext * ctx)
         tcg_gen_qemu_ld_i32(REG(0), REG(B11_8), ctx->memidx,
                             MO_TEUL | MO_UNALN);
         return;
-        break;
     case 0x40e9:                /* movua.l @Rm+,R0 */
         CHECK_SH4A
         /* Load non-boundary-aligned data */
@@ -1550,7 +1549,6 @@ static void _decode_opc(DisasContext * ctx)
                             MO_TEUL | MO_UNALN);
         tcg_gen_addi_i32(REG(B11_8), REG(B11_8), 4);
         return;
-        break;
     case 0x0029:		/* movt Rn */
         tcg_gen_mov_i32(REG(B11_8), cpu_sr_t);
 	return;
@@ -1638,7 +1636,6 @@ static void _decode_opc(DisasContext * ctx)
         CHECK_SH4A
         tcg_gen_mb(TCG_MO_ALL | TCG_BAR_SC);
         return;
-        break;
     case 0x4024:		/* rotcl Rn */
 	{
 	    TCGv tmp = tcg_temp_new();
-- 
2.26.2



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

* [PULL 09/44] target/cris: Remove superfluous breaks
  2020-09-01 14:09 [PULL 00/44] Trivial branch for 5.2 patches Laurent Vivier
                   ` (7 preceding siblings ...)
  2020-09-01 14:09 ` [PULL 08/44] target/sh4: " Laurent Vivier
@ 2020-09-01 14:09 ` Laurent Vivier
  2020-09-01 14:09 ` [PULL 10/44] hw/net/can: Add missing fallthrough statements Laurent Vivier
                   ` (34 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Laurent Vivier @ 2020-09-01 14:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: Yi Wang, Thomas Huth, qemu-trivial, Laurent Vivier,
	Philippe Mathieu-Daudé,
	Liao Pingfang

From: Liao Pingfang <liao.pingfang@zte.com.cn>

Remove superfluous breaks, as there is a "return" before them.

Signed-off-by: Liao Pingfang <liao.pingfang@zte.com.cn>
Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <1594631150-36801-1-git-send-email-wang.yi59@zte.com.cn>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 target/cris/translate.c         | 7 +++----
 target/cris/translate_v10.c.inc | 2 --
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/target/cris/translate.c b/target/cris/translate.c
index ee5e359c7788..c312e6f8a65f 100644
--- a/target/cris/translate.c
+++ b/target/cris/translate.c
@@ -1178,12 +1178,11 @@ static inline void t_gen_zext(TCGv d, TCGv s, int size)
 static char memsize_char(int size)
 {
     switch (size) {
-    case 1: return 'b';  break;
-    case 2: return 'w';  break;
-    case 4: return 'd';  break;
+    case 1: return 'b';
+    case 2: return 'w';
+    case 4: return 'd';
     default:
         return 'x';
-        break;
     }
 }
 #endif
diff --git a/target/cris/translate_v10.c.inc b/target/cris/translate_v10.c.inc
index ae34a0d1a3d8..7f38fd215eae 100644
--- a/target/cris/translate_v10.c.inc
+++ b/target/cris/translate_v10.c.inc
@@ -1026,10 +1026,8 @@ static unsigned int dec10_ind(CPUCRISState *env, DisasContext *dc)
         switch (dc->opcode) {
             case CRISV10_IND_MOVE_M_R:
                 return dec10_ind_move_m_r(env, dc, size);
-                break;
             case CRISV10_IND_MOVE_R_M:
                 return dec10_ind_move_r_m(dc, size);
-                break;
             case CRISV10_IND_CMP:
                 LOG_DIS("cmp size=%d op=%d %d\n",  size, dc->src, dc->dst);
                 cris_cc_mask(dc, CC_MASK_NZVC);
-- 
2.26.2



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

* [PULL 10/44] hw/net/can: Add missing fallthrough statements
  2020-09-01 14:09 [PULL 00/44] Trivial branch for 5.2 patches Laurent Vivier
                   ` (8 preceding siblings ...)
  2020-09-01 14:09 ` [PULL 09/44] target/cris: " Laurent Vivier
@ 2020-09-01 14:09 ` Laurent Vivier
  2020-09-01 14:09 ` [PULL 11/44] hw/i386/kvm/ioapic.c: fix typo in error message Laurent Vivier
                   ` (33 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Laurent Vivier @ 2020-09-01 14:09 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Thomas Huth, Laurent Vivier, Pavel Pisa

From: Thomas Huth <thuth@redhat.com>

Add fallthrough annotations to be able to compile the code without
warnings when using -Wimplicit-fallthrough in our CFLAGS. Looking
at the code, it seems like the fallthrough is indeed intended here,
so the comments should be appropriate.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Message-Id: <20200630075520.29825-1-thuth@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/net/can/can_sja1000.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/net/can/can_sja1000.c b/hw/net/can/can_sja1000.c
index ea915a023a51..299932998a6f 100644
--- a/hw/net/can/can_sja1000.c
+++ b/hw/net/can/can_sja1000.c
@@ -523,6 +523,7 @@ void can_sja_mem_write(CanSJA1000State *s, hwaddr addr, uint64_t val,
             break;
         case 16: /* RX frame information addr16-28. */
             s->status_pel |= (1 << 5); /* Set transmit status. */
+            /* fallthrough */
         case 17 ... 28:
             if (s->mode & 0x01) { /* Reset mode */
                 if (addr < 24) {
@@ -620,6 +621,7 @@ void can_sja_mem_write(CanSJA1000State *s, hwaddr addr, uint64_t val,
             break;
         case 10:
             s->status_bas |= (1 << 5); /* Set transmit status. */
+            /* fallthrough */
         case 11 ... 19:
             if ((s->control & 0x01) == 0) { /* Operation mode */
                 s->tx_buff[addr - 10] = val; /* Store to TX buffer directly. */
-- 
2.26.2



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

* [PULL 11/44] hw/i386/kvm/ioapic.c: fix typo in error message
  2020-09-01 14:09 [PULL 00/44] Trivial branch for 5.2 patches Laurent Vivier
                   ` (9 preceding siblings ...)
  2020-09-01 14:09 ` [PULL 10/44] hw/net/can: Add missing fallthrough statements Laurent Vivier
@ 2020-09-01 14:09 ` Laurent Vivier
  2020-09-01 14:09 ` [PULL 12/44] hw/isa/isa-superio: Fix IDE controller realization Laurent Vivier
                   ` (32 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Laurent Vivier @ 2020-09-01 14:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Li Qiang, Laurent Vivier, Kenta Ishiguro,
	Philippe Mathieu-Daudé,
	Stefano Garzarella

From: Kenta Ishiguro <kentaishiguro@slowstart.org>

Fix a typo in an error message for KVM_SET_IRQCHIP ioctl:
"KVM_GET_IRQCHIP" should be "KVM_SET_IRQCHIP".

Fixes: a39c1d47ac ("kvm: x86: Add user space part for in-kernel IOAPIC")
Signed-off-by: Kenta Ishiguro <kentaishiguro@slowstart.org>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
Message-Id: <20200717123514.15406-1-kentaishiguro@slowstart.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/i386/kvm/ioapic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/i386/kvm/ioapic.c b/hw/i386/kvm/ioapic.c
index 4ba8e472510d..c5528df942a2 100644
--- a/hw/i386/kvm/ioapic.c
+++ b/hw/i386/kvm/ioapic.c
@@ -97,7 +97,7 @@ static void kvm_ioapic_put(IOAPICCommonState *s)
 
     ret = kvm_vm_ioctl(kvm_state, KVM_SET_IRQCHIP, &chip);
     if (ret < 0) {
-        fprintf(stderr, "KVM_GET_IRQCHIP failed: %s\n", strerror(ret));
+        fprintf(stderr, "KVM_SET_IRQCHIP failed: %s\n", strerror(ret));
         abort();
     }
 }
-- 
2.26.2



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

* [PULL 12/44] hw/isa/isa-superio: Fix IDE controller realization
  2020-09-01 14:09 [PULL 00/44] Trivial branch for 5.2 patches Laurent Vivier
                   ` (10 preceding siblings ...)
  2020-09-01 14:09 ` [PULL 11/44] hw/i386/kvm/ioapic.c: fix typo in error message Laurent Vivier
@ 2020-09-01 14:09 ` Laurent Vivier
  2020-09-01 14:09 ` [PULL 13/44] stubs/cmos: Use correct include Laurent Vivier
                   ` (31 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Laurent Vivier @ 2020-09-01 14:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Markus Armbruster, Paolo Bonzini, Laurent Vivier,
	Philippe Mathieu-Daudé

From: Philippe Mathieu-Daudé <f4bug@amsat.org>

When realizing a Super I/O with IDE controller [*], we get:

  qom/object.c:1684: object_property_try_add_child: Assertion `!child->parent' failed.
  Aborted (core dumped)

This is because the device is already realized when we try to
add the QOM property to the parent. Fix by realizing *after*
adding the QOM relationship.

[*] Set ISASuperIOClass::ide.count = N with N not zero
    (no such thing currently exists; the bug is latent)

Fixes: e508430619 ("hw/isa/superio: Make the components QOM children")
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20200721124516.9602-1-f4bug@amsat.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/isa/isa-superio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/isa/isa-superio.c b/hw/isa/isa-superio.c
index e2e47d8fd99a..179c1856956b 100644
--- a/hw/isa/isa-superio.c
+++ b/hw/isa/isa-superio.c
@@ -158,8 +158,8 @@ static void isa_superio_realize(DeviceState *dev, Error **errp)
         if (k->ide.get_irq) {
             qdev_prop_set_uint32(d, "irq", k->ide.get_irq(sio, 0));
         }
-        isa_realize_and_unref(isa, bus, &error_fatal);
         object_property_add_child(OBJECT(sio), "isa-ide", OBJECT(isa));
+        isa_realize_and_unref(isa, bus, &error_fatal);
         sio->ide = isa;
         trace_superio_create_ide(0,
                                  k->ide.get_iobase ?
-- 
2.26.2



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

* [PULL 13/44] stubs/cmos: Use correct include
  2020-09-01 14:09 [PULL 00/44] Trivial branch for 5.2 patches Laurent Vivier
                   ` (11 preceding siblings ...)
  2020-09-01 14:09 ` [PULL 12/44] hw/isa/isa-superio: Fix IDE controller realization Laurent Vivier
@ 2020-09-01 14:09 ` Laurent Vivier
  2020-09-01 14:09 ` [PULL 14/44] qemu-options.hx: Fix typo for netdev documentation Laurent Vivier
                   ` (30 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Laurent Vivier @ 2020-09-01 14:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, John Snow, Laurent Vivier, Philippe Mathieu-Daudé

From: Philippe Mathieu-Daudé <f4bug@amsat.org>

cmos_get_fd_drive_type() is declared in "hw/block/fdc.h".
This currently works because "hw/i386/pc.h" happens to
include it. Simplify including the correct header.

Fixes: 2055dbc1c9 ("acpi: move aml builder code for floppy device")
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: John Snow <jsnow@redhat.com>
Message-Id: <20200724084315.1606-1-f4bug@amsat.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 stubs/cmos.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/stubs/cmos.c b/stubs/cmos.c
index 416cbe4055ff..3fdbae2c69e8 100644
--- a/stubs/cmos.c
+++ b/stubs/cmos.c
@@ -1,5 +1,5 @@
 #include "qemu/osdep.h"
-#include "hw/i386/pc.h"
+#include "hw/block/fdc.h"
 
 int cmos_get_fd_drive_type(FloppyDriveType fd0)
 {
-- 
2.26.2



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

* [PULL 14/44] qemu-options.hx: Fix typo for netdev documentation
  2020-09-01 14:09 [PULL 00/44] Trivial branch for 5.2 patches Laurent Vivier
                   ` (12 preceding siblings ...)
  2020-09-01 14:09 ` [PULL 13/44] stubs/cmos: Use correct include Laurent Vivier
@ 2020-09-01 14:09 ` Laurent Vivier
  2020-09-01 14:09 ` [PULL 15/44] hw/core/sysbus: Fix a typo Laurent Vivier
                   ` (29 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Laurent Vivier @ 2020-09-01 14:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: Thomas Huth, Tianjia Zhang, Michael S . Tsirkin, qemu-trivial,
	Li Qiang, Laurent Vivier

From: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>

This patch fixes the netdev document description typo in qemu-option.hx.

Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20200727045925.29375-1-tianjia.zhang@linux.alibaba.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 qemu-options.hx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qemu-options.hx b/qemu-options.hx
index 30019c4eca2f..b0f020594eab 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -2684,7 +2684,7 @@ SRST
     disable script execution.
 
     If running QEMU as an unprivileged user, use the network helper
-    helper to configure the TAP interface and attach it to the bridge.
+    to configure the TAP interface and attach it to the bridge.
     The default network helper executable is
     ``/path/to/qemu-bridge-helper`` and the default bridge device is
     ``br0``.
-- 
2.26.2



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

* [PULL 15/44] hw/core/sysbus: Fix a typo
  2020-09-01 14:09 [PULL 00/44] Trivial branch for 5.2 patches Laurent Vivier
                   ` (13 preceding siblings ...)
  2020-09-01 14:09 ` [PULL 14/44] qemu-options.hx: Fix typo for netdev documentation Laurent Vivier
@ 2020-09-01 14:09 ` Laurent Vivier
  2020-09-01 14:09 ` [PULL 16/44] hw/core/sysbus: Assert memory region index is in range Laurent Vivier
                   ` (28 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Laurent Vivier @ 2020-09-01 14:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Richard Henderson, Laurent Vivier,
	Philippe Mathieu-Daudé

From: Philippe Mathieu-Daudé <f4bug@amsat.org>

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20200806130945.21629-2-f4bug@amsat.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/core/sysbus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/core/sysbus.c b/hw/core/sysbus.c
index 70239b7e7d09..77ab351ce1a8 100644
--- a/hw/core/sysbus.c
+++ b/hw/core/sysbus.c
@@ -64,7 +64,7 @@ void foreach_dynamic_sysbus_device(FindSysbusDeviceFunc *func, void *opaque)
         .opaque = opaque,
     };
 
-    /* Loop through all sysbus devices that were spawened outside the machine */
+    /* Loop through all sysbus devices that were spawned outside the machine */
     container = container_get(qdev_get_machine(), "/peripheral");
     find_sysbus_device(container, &find);
     container = container_get(qdev_get_machine(), "/peripheral-anon");
-- 
2.26.2



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

* [PULL 16/44] hw/core/sysbus: Assert memory region index is in range
  2020-09-01 14:09 [PULL 00/44] Trivial branch for 5.2 patches Laurent Vivier
                   ` (14 preceding siblings ...)
  2020-09-01 14:09 ` [PULL 15/44] hw/core/sysbus: Fix a typo Laurent Vivier
@ 2020-09-01 14:09 ` Laurent Vivier
  2020-09-01 14:09 ` [PULL 17/44] Revert "mailmap: Update philmd email address" Laurent Vivier
                   ` (27 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Laurent Vivier @ 2020-09-01 14:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Richard Henderson, Laurent Vivier,
	Philippe Mathieu-Daudé

From: Philippe Mathieu-Daudé <f4bug@amsat.org>

Devices incorrectly modelled might use invalid index while
calling sysbus_mmio_get_region(), leading to OOB access.
Help developers by asserting the index is in range.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20200806130945.21629-3-f4bug@amsat.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/core/sysbus.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/core/sysbus.c b/hw/core/sysbus.c
index 77ab351ce1a8..294f90b7deef 100644
--- a/hw/core/sysbus.c
+++ b/hw/core/sysbus.c
@@ -199,6 +199,7 @@ void sysbus_init_mmio(SysBusDevice *dev, MemoryRegion *memory)
 
 MemoryRegion *sysbus_mmio_get_region(SysBusDevice *dev, int n)
 {
+    assert(n >= 0 && n < QDEV_MAX_MMIO);
     return dev->mmio[n].memory;
 }
 
-- 
2.26.2



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

* [PULL 17/44] Revert "mailmap: Update philmd email address"
  2020-09-01 14:09 [PULL 00/44] Trivial branch for 5.2 patches Laurent Vivier
                   ` (15 preceding siblings ...)
  2020-09-01 14:09 ` [PULL 16/44] hw/core/sysbus: Assert memory region index is in range Laurent Vivier
@ 2020-09-01 14:09 ` Laurent Vivier
  2020-09-01 14:09 ` [PULL 18/44] docs: Fix broken links Laurent Vivier
                   ` (26 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Laurent Vivier @ 2020-09-01 14:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Philippe Mathieu-Daudé,
	Laurent Vivier, Philippe Mathieu-Daudé

From: Philippe Mathieu-Daudé <philmd@redhat.com>

This mailmap entry does not work as I expected. I am receiving
emails related to my hobbyist contributions in my work mailbox
and I get distracted :) Remove the entry to keep things separated.

This reverts commit 289371239153b24cb7bd96b6948c6b40b4627a9b.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20200806135832.2319-1-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 .mailmap | 1 -
 1 file changed, 1 deletion(-)

diff --git a/.mailmap b/.mailmap
index 81c2ce09370c..2d97a14af3c6 100644
--- a/.mailmap
+++ b/.mailmap
@@ -54,7 +54,6 @@ Radoslaw Biernacki <rad@semihalf.com> <radoslaw.biernacki@linaro.org>
 Paul Burton <pburton@wavecomp.com> <paul.burton@mips.com>
 Paul Burton <pburton@wavecomp.com> <paul.burton@imgtec.com>
 Paul Burton <pburton@wavecomp.com> <paul@archlinuxmips.org>
-Philippe Mathieu-Daudé <philmd@redhat.com> <f4bug@amsat.org>
 Stefan Brankovic <stefan.brankovic@syrmia.com> <stefan.brankovic@rt-rk.com.com>
 Yongbok Kim <yongbok.kim@mips.com> <yongbok.kim@imgtec.com>
 
-- 
2.26.2



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

* [PULL 18/44] docs: Fix broken links
  2020-09-01 14:09 [PULL 00/44] Trivial branch for 5.2 patches Laurent Vivier
                   ` (16 preceding siblings ...)
  2020-09-01 14:09 ` [PULL 17/44] Revert "mailmap: Update philmd email address" Laurent Vivier
@ 2020-09-01 14:09 ` Laurent Vivier
  2020-09-01 14:09 ` [PULL 19/44] .mailmap: Update Paul Burton email address Laurent Vivier
                   ` (25 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Laurent Vivier @ 2020-09-01 14:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Philippe Mathieu-Daudé, Laurent Vivier, Han Han

From: Han Han <hhan@redhat.com>

Signed-off-by: Han Han <hhan@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200807101736.3544506-1-hhan@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 docs/amd-memory-encryption.txt | 4 ++--
 docs/pvrdma.txt                | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/docs/amd-memory-encryption.txt b/docs/amd-memory-encryption.txt
index 43bf3ee6a5a9..80b8eb00e980 100644
--- a/docs/amd-memory-encryption.txt
+++ b/docs/amd-memory-encryption.txt
@@ -95,10 +95,10 @@ References
 -----------------
 
 AMD Memory Encryption whitepaper:
-http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2013/12/AMD_Memory_Encryption_Whitepaper_v7-Public.pdf
+https://developer.amd.com/wordpress/media/2013/12/AMD_Memory_Encryption_Whitepaper_v7-Public.pdf
 
 Secure Encrypted Virtualization Key Management:
-[1] http://support.amd.com/TechDocs/55766_SEV-KM API_Specification.pdf
+[1] http://developer.amd.com/wordpress/media/2017/11/55766_SEV-KM-API_Specification.pdf
 
 KVM Forum slides:
 http://www.linux-kvm.org/images/7/74/02x08A-Thomas_Lendacky-AMDs_Virtualizatoin_Memory_Encryption_Technology.pdf
diff --git a/docs/pvrdma.txt b/docs/pvrdma.txt
index 0f0dd8a7e562..5c122fe81813 100644
--- a/docs/pvrdma.txt
+++ b/docs/pvrdma.txt
@@ -18,7 +18,7 @@ over-commit and, even if not implemented yet, migration support will be
 possible with some HW assistance.
 
 A project presentation accompany this document:
-- http://events.linuxfoundation.org/sites/events/files/slides/lpc-2017-pvrdma-marcel-apfelbaum-yuval-shaia.pdf
+- https://blog.linuxplumbersconf.org/2017/ocw/system/presentations/4730/original/lpc-2017-pvrdma-marcel-apfelbaum-yuval-shaia.pdf
 
 
 
-- 
2.26.2



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

* [PULL 19/44] .mailmap: Update Paul Burton email address
  2020-09-01 14:09 [PULL 00/44] Trivial branch for 5.2 patches Laurent Vivier
                   ` (17 preceding siblings ...)
  2020-09-01 14:09 ` [PULL 18/44] docs: Fix broken links Laurent Vivier
@ 2020-09-01 14:09 ` Laurent Vivier
  2020-09-01 14:09 ` [PULL 20/44] hw/i2c: Fix typo in description Laurent Vivier
                   ` (24 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Laurent Vivier @ 2020-09-01 14:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Paolo Bonzini, Laurent Vivier, Paul Burton,
	Philippe Mathieu-Daudé

From: Philippe Mathieu-Daudé <f4bug@amsat.org>

Following the Linux kernel equivalent patch posted on
linux-mips@vger.kernel.org [*], update Paul Burton email
address to avoid emails bouncing.

[*] 'MAINTAINERS: Use @kernel.org address for Paul Burton'
https://lore.kernel.org/patchwork/patch/1140341/

Cc: Paul Burton <paulburton@kernel.org>
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: Paul Burton <paulburton@kernel.org>
Message-Id: <20200707022544.24925-1-f4bug@amsat.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 .mailmap | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/.mailmap b/.mailmap
index 2d97a14af3c6..4f40d1cc6e1b 100644
--- a/.mailmap
+++ b/.mailmap
@@ -51,9 +51,10 @@ Frederic Konrad <konrad@adacore.com> <fred.konrad@greensocs.com>
 James Hogan <jhogan@kernel.org> <james.hogan@imgtec.com>
 Leif Lindholm <leif@nuviainc.com> <leif.lindholm@linaro.org>
 Radoslaw Biernacki <rad@semihalf.com> <radoslaw.biernacki@linaro.org>
-Paul Burton <pburton@wavecomp.com> <paul.burton@mips.com>
-Paul Burton <pburton@wavecomp.com> <paul.burton@imgtec.com>
-Paul Burton <pburton@wavecomp.com> <paul@archlinuxmips.org>
+Paul Burton <paulburton@kernel.org> <paul.burton@mips.com>
+Paul Burton <paulburton@kernel.org> <paul.burton@imgtec.com>
+Paul Burton <paulburton@kernel.org> <paul@archlinuxmips.org>
+Paul Burton <paulburton@kernel.org> <pburton@wavecomp.com>
 Stefan Brankovic <stefan.brankovic@syrmia.com> <stefan.brankovic@rt-rk.com.com>
 Yongbok Kim <yongbok.kim@mips.com> <yongbok.kim@imgtec.com>
 
-- 
2.26.2



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

* [PULL 20/44] hw/i2c: Fix typo in description
  2020-09-01 14:09 [PULL 00/44] Trivial branch for 5.2 patches Laurent Vivier
                   ` (18 preceding siblings ...)
  2020-09-01 14:09 ` [PULL 19/44] .mailmap: Update Paul Burton email address Laurent Vivier
@ 2020-09-01 14:09 ` Laurent Vivier
  2020-09-01 14:09 ` [PULL 21/44] util/qemu-timer: " Laurent Vivier
                   ` (23 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Laurent Vivier @ 2020-09-01 14:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: Corey Minyard, Peter Maydell, qemu-trivial, Li Qiang,
	Laurent Vivier, Philippe Mathieu-Daudé

From: Philippe Mathieu-Daudé <philmd@redhat.com>

Remove the second 'and' introduced in commit 73d5f22ecb
("hw/i2c: Document the I2C qdev helpers").

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Corey Minyard <cminyard@mvista.com>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20200811151643.21293-2-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 include/hw/i2c/i2c.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/hw/i2c/i2c.h b/include/hw/i2c/i2c.h
index a9c030a51233..f57808851e22 100644
--- a/include/hw/i2c/i2c.h
+++ b/include/hw/i2c/i2c.h
@@ -102,7 +102,7 @@ I2CSlave *i2c_slave_new(const char *name, uint8_t addr);
 I2CSlave *i2c_slave_create_simple(I2CBus *bus, const char *name, uint8_t addr);
 
 /**
- * Realize and and drop a reference an I2C slave device
+ * Realize and drop a reference an I2C slave device
  * @dev: I2C slave device to realize
  * @bus: I2C bus to put it on
  * @addr: I2C address of the slave on the bus
-- 
2.26.2



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

* [PULL 21/44] util/qemu-timer: Fix typo in description
  2020-09-01 14:09 [PULL 00/44] Trivial branch for 5.2 patches Laurent Vivier
                   ` (19 preceding siblings ...)
  2020-09-01 14:09 ` [PULL 20/44] hw/i2c: Fix typo in description Laurent Vivier
@ 2020-09-01 14:09 ` Laurent Vivier
  2020-09-01 14:09 ` [PULL 22/44] util/vfio-helpers: " Laurent Vivier
                   ` (22 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Laurent Vivier @ 2020-09-01 14:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Li Qiang, Philippe Mathieu-Daudé,
	Laurent Vivier, Peter Maydell

From: Philippe Mathieu-Daudé <philmd@redhat.com>

Remove the second 'and' introduced in commit e81f86790f ("qemu-timer:
avoid checkpoints for virtual clock timers in external subsystems").

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20200811151643.21293-3-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 util/qemu-timer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/util/qemu-timer.c b/util/qemu-timer.c
index f62b4feecdb0..878d80fd5e5e 100644
--- a/util/qemu-timer.c
+++ b/util/qemu-timer.c
@@ -530,7 +530,7 @@ bool timerlist_run_timers(QEMUTimerList *timer_list)
     }
 
     /*
-     * Extract expired timers from active timers list and and process them.
+     * Extract expired timers from active timers list and process them.
      *
      * In rr mode we need "filtered" checkpointing for virtual clock.  The
      * checkpoint must be recorded/replayed before processing any non-EXTERNAL timer,
-- 
2.26.2



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

* [PULL 22/44] util/vfio-helpers: Fix typo in description
  2020-09-01 14:09 [PULL 00/44] Trivial branch for 5.2 patches Laurent Vivier
                   ` (20 preceding siblings ...)
  2020-09-01 14:09 ` [PULL 21/44] util/qemu-timer: " Laurent Vivier
@ 2020-09-01 14:09 ` Laurent Vivier
  2020-09-01 14:09 ` [PULL 23/44] mailmap: Add entry for Greg Kurz Laurent Vivier
                   ` (21 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Laurent Vivier @ 2020-09-01 14:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Li Qiang, Philippe Mathieu-Daudé,
	Laurent Vivier, Peter Maydell

From: Philippe Mathieu-Daudé <philmd@redhat.com>

Remove the second 'and' introduced in commit 418026ca43
("util: Introduce vfio helpers").

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20200811151643.21293-4-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 util/vfio-helpers.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/util/vfio-helpers.c b/util/vfio-helpers.c
index e399e330e26a..583bdfb36fc2 100644
--- a/util/vfio-helpers.c
+++ b/util/vfio-helpers.c
@@ -173,7 +173,7 @@ void qemu_vfio_pci_unmap_bar(QEMUVFIOState *s, int index, void *bar,
 }
 
 /**
- * Initialize device IRQ with @irq_type and and register an event notifier.
+ * Initialize device IRQ with @irq_type and register an event notifier.
  */
 int qemu_vfio_pci_init_irq(QEMUVFIOState *s, EventNotifier *e,
                            int irq_type, Error **errp)
@@ -505,7 +505,7 @@ static IOVAMapping *qemu_vfio_find_mapping(QEMUVFIOState *s, void *host,
 }
 
 /**
- * Allocate IOVA and and create a new mapping record and insert it in @s.
+ * Allocate IOVA and create a new mapping record and insert it in @s.
  */
 static IOVAMapping *qemu_vfio_add_mapping(QEMUVFIOState *s,
                                           void *host, size_t size,
-- 
2.26.2



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

* [PULL 23/44] mailmap: Add entry for Greg Kurz
  2020-09-01 14:09 [PULL 00/44] Trivial branch for 5.2 patches Laurent Vivier
                   ` (21 preceding siblings ...)
  2020-09-01 14:09 ` [PULL 22/44] util/vfio-helpers: " Laurent Vivier
@ 2020-09-01 14:09 ` Laurent Vivier
  2020-09-01 14:09 ` [PULL 24/44] docs/system/target-avr: Improve the AVR docs and add to MAINTAINERS Laurent Vivier
                   ` (20 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Laurent Vivier @ 2020-09-01 14:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Philippe Mathieu-Daudé, Laurent Vivier, Greg Kurz

From: Greg Kurz <groug@kaod.org>

I had stopped using gkurz@linux.vnet.ibm.com a while back already but
this email address was shutdown last June when I quit IBM. It's about
time to map it to groug@kaod.org.

Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <159724665142.75339.817685642171828648.stgit@bahia.lan>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 .mailmap | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.mailmap b/.mailmap
index 4f40d1cc6e1b..b914c9e290e0 100644
--- a/.mailmap
+++ b/.mailmap
@@ -48,6 +48,7 @@ Alexander Graf <agraf@csgraf.de> <agraf@suse.de>
 Anthony Liguori <anthony@codemonkey.ws> Anthony Liguori <aliguori@us.ibm.com>
 Filip Bozuta <filip.bozuta@syrmia.com> <filip.bozuta@rt-rk.com.com>
 Frederic Konrad <konrad@adacore.com> <fred.konrad@greensocs.com>
+Greg Kurz <groug@kaod.org> <gkurz@linux.vnet.ibm.com>
 James Hogan <jhogan@kernel.org> <james.hogan@imgtec.com>
 Leif Lindholm <leif@nuviainc.com> <leif.lindholm@linaro.org>
 Radoslaw Biernacki <rad@semihalf.com> <radoslaw.biernacki@linaro.org>
-- 
2.26.2



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

* [PULL 24/44] docs/system/target-avr: Improve the AVR docs and add to MAINTAINERS
  2020-09-01 14:09 [PULL 00/44] Trivial branch for 5.2 patches Laurent Vivier
                   ` (22 preceding siblings ...)
  2020-09-01 14:09 ` [PULL 23/44] mailmap: Add entry for Greg Kurz Laurent Vivier
@ 2020-09-01 14:09 ` Laurent Vivier
  2020-09-01 14:09 ` [PULL 25/44] hw/ide/core: Trivial typo fix Laurent Vivier
                   ` (19 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Laurent Vivier @ 2020-09-01 14:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Thomas Huth, Richard Henderson, Laurent Vivier,
	Michael Rolnik

From: Thomas Huth <huth@tuxfamily.org>

The examples look nicer when using "::" code blocks.
Also mention that "-d in_asm" only outputs instructions that have not
been translated by the JIT layer yet.
And while we're at it, also add the AVR doc file to the MAINTAINERS file.

Signed-off-by: Thomas Huth <huth@tuxfamily.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Michael Rolnik <mrolnik@gmail.com>
Message-Id: <20200812155304.18016-1-huth@tuxfamily.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 MAINTAINERS                |  1 +
 docs/system/target-avr.rst | 47 +++++++++++++++++++++++---------------
 2 files changed, 30 insertions(+), 18 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 5a22c8be4296..b5ba553ee01a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -171,6 +171,7 @@ AVR TCG CPUs
 M: Michael Rolnik <mrolnik@gmail.com>
 R: Sarah Harris <S.E.Harris@kent.ac.uk>
 S: Maintained
+F: docs/system/target-avr.rst
 F: gdb-xml/avr-cpu.xml
 F: target/avr/
 F: tests/acceptance/machine_avr6.py
diff --git a/docs/system/target-avr.rst b/docs/system/target-avr.rst
index dc99afc895d0..eb5c513cce09 100644
--- a/docs/system/target-avr.rst
+++ b/docs/system/target-avr.rst
@@ -17,21 +17,32 @@ https://github.com/seharris/qemu-avr-tests/blob/master/free-rtos/Demo/AVR_ATMega
 Following are examples of possible usages, assuming demo.elf is compiled for
 AVR cpu
 
- - Continuous non interrupted execution:
-   ``qemu-system-avr -machine mega2560 -bios demo.elf``
-
- - Continuous non interrupted execution with serial output into telnet window:
-   ``qemu-system-avr -machine mega2560 -bios demo.elf -serial
-   tcp::5678,server,nowait -nographic``
-   and then in another shell
-   ``telnet localhost 5678``
-
- - Debugging wit GDB debugger:
-   ``qemu-system-avr -machine mega2560 -bios demo.elf -s -S``
-   and then in another shell
-   ``avr-gdb demo.elf``
-   and then within GDB shell
-   ``target remote :1234``
-
- - Print out executed instructions:
-   ``qemu-system-avr -machine mega2560 -bios demo.elf -d in_asm``
+- Continuous non interrupted execution::
+
+   qemu-system-avr -machine mega2560 -bios demo.elf
+
+- Continuous non interrupted execution with serial output into telnet window::
+
+   qemu-system-avr -M mega2560 -bios demo.elf -nographic \
+                   -serial tcp::5678,server,nowait
+
+  and then in another shell::
+
+   telnet localhost 5678
+
+- Debugging wit GDB debugger::
+
+   qemu-system-avr -machine mega2560 -bios demo.elf -s -S
+
+  and then in another shell::
+
+   avr-gdb demo.elf
+
+  and then within GDB shell::
+
+   target remote :1234
+
+- Print out executed instructions (that have not been translated by the JIT
+  compiler yet)::
+
+   qemu-system-avr -machine mega2560 -bios demo.elf -d in_asm
-- 
2.26.2



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

* [PULL 25/44] hw/ide/core: Trivial typo fix
  2020-09-01 14:09 [PULL 00/44] Trivial branch for 5.2 patches Laurent Vivier
                   ` (23 preceding siblings ...)
  2020-09-01 14:09 ` [PULL 24/44] docs/system/target-avr: Improve the AVR docs and add to MAINTAINERS Laurent Vivier
@ 2020-09-01 14:09 ` Laurent Vivier
  2020-09-01 14:09 ` [PULL 26/44] hw/ide/ahci: Replace magic '512' value by BDRV_SECTOR_SIZE Laurent Vivier
                   ` (18 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Laurent Vivier @ 2020-09-01 14:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, qemu-trivial, Li Qiang, Richard Henderson,
	Laurent Vivier, Philippe Mathieu-Daudé,
	Stefano Garzarella

From: Philippe Mathieu-Daudé <f4bug@amsat.org>

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Message-Id: <20200814082841.27000-3-f4bug@amsat.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/ide/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/ide/core.c b/hw/ide/core.c
index d997a78e47fe..f76f7e5234bc 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -709,7 +709,7 @@ void ide_cancel_dma_sync(IDEState *s)
     /*
      * We can't cancel Scatter Gather DMA in the middle of the
      * operation or a partial (not full) DMA transfer would reach
-     * the storage so we wait for completion instead (we beahve
+     * the storage so we wait for completion instead (we behave
      * like if the DMA was completed by the time the guest trying
      * to cancel dma with bmdma_cmd_writeb with BM_CMD_START not
      * set).
-- 
2.26.2



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

* [PULL 26/44] hw/ide/ahci: Replace magic '512' value by BDRV_SECTOR_SIZE
  2020-09-01 14:09 [PULL 00/44] Trivial branch for 5.2 patches Laurent Vivier
                   ` (24 preceding siblings ...)
  2020-09-01 14:09 ` [PULL 25/44] hw/ide/core: Trivial typo fix Laurent Vivier
@ 2020-09-01 14:09 ` Laurent Vivier
  2020-09-01 14:09 ` [PULL 27/44] hw/ide/atapi: " Laurent Vivier
                   ` (17 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Laurent Vivier @ 2020-09-01 14:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Li Qiang, Richard Henderson, Laurent Vivier,
	Philippe Mathieu-Daudé,
	Stefano Garzarella

From: Philippe Mathieu-Daudé <f4bug@amsat.org>

Use self-explicit definitions instead of magic '512' value.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Message-Id: <20200814082841.27000-5-f4bug@amsat.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/ide/ahci.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c
index 009120f88b78..b696c6291a38 100644
--- a/hw/ide/ahci.c
+++ b/hw/ide/ahci.c
@@ -1151,7 +1151,7 @@ static void process_ncq_command(AHCIState *s, int port, uint8_t *cmd_fis,
     if (!ncq_tfs->sector_count) {
         ncq_tfs->sector_count = 0x10000;
     }
-    size = ncq_tfs->sector_count * 512;
+    size = ncq_tfs->sector_count * BDRV_SECTOR_SIZE;
     ahci_populate_sglist(ad, &ncq_tfs->sglist, ncq_tfs->cmdh, size, 0);
 
     if (ncq_tfs->sglist.size < size) {
@@ -1703,7 +1703,8 @@ static int ahci_state_post_load(void *opaque, int version_id)
                 return -1;
             }
             ahci_populate_sglist(ncq_tfs->drive, &ncq_tfs->sglist,
-                                 ncq_tfs->cmdh, ncq_tfs->sector_count * 512,
+                                 ncq_tfs->cmdh,
+                                 ncq_tfs->sector_count * BDRV_SECTOR_SIZE,
                                  0);
             if (ncq_tfs->sector_count != ncq_tfs->sglist.size >> 9) {
                 return -1;
-- 
2.26.2



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

* [PULL 27/44] hw/ide/atapi: Replace magic '512' value by BDRV_SECTOR_SIZE
  2020-09-01 14:09 [PULL 00/44] Trivial branch for 5.2 patches Laurent Vivier
                   ` (25 preceding siblings ...)
  2020-09-01 14:09 ` [PULL 26/44] hw/ide/ahci: Replace magic '512' value by BDRV_SECTOR_SIZE Laurent Vivier
@ 2020-09-01 14:09 ` Laurent Vivier
  2020-09-01 14:09 ` [PULL 28/44] hw/ide/pci: " Laurent Vivier
                   ` (16 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Laurent Vivier @ 2020-09-01 14:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Li Qiang, Richard Henderson, Laurent Vivier,
	Philippe Mathieu-Daudé,
	Stefano Garzarella

From: Philippe Mathieu-Daudé <f4bug@amsat.org>

Use self-explicit definitions instead of magic '512' value.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Message-Id: <20200814082841.27000-6-f4bug@amsat.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/ide/atapi.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c
index 17a9d635d842..14a2b0bb2f8a 100644
--- a/hw/ide/atapi.c
+++ b/hw/ide/atapi.c
@@ -824,9 +824,9 @@ static void cmd_get_configuration(IDEState *s, uint8_t *buf)
      *
      *      Only a problem if the feature/profiles grow.
      */
-    if (max_len > 512) {
+    if (max_len > BDRV_SECTOR_SIZE) {
         /* XXX: assume 1 sector */
-        max_len = 512;
+        max_len = BDRV_SECTOR_SIZE;
     }
 
     memset(buf, 0, max_len);
@@ -1186,8 +1186,8 @@ static void cmd_read_dvd_structure(IDEState *s, uint8_t* buf)
         }
     }
 
-    memset(buf, 0, max_len > IDE_DMA_BUF_SECTORS * 512 + 4 ?
-           IDE_DMA_BUF_SECTORS * 512 + 4 : max_len);
+    memset(buf, 0, max_len > IDE_DMA_BUF_SECTORS * BDRV_SECTOR_SIZE + 4 ?
+           IDE_DMA_BUF_SECTORS * BDRV_SECTOR_SIZE + 4 : max_len);
 
     switch (format) {
         case 0x00 ... 0x7f:
-- 
2.26.2



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

* [PULL 28/44] hw/ide/pci: Replace magic '512' value by BDRV_SECTOR_SIZE
  2020-09-01 14:09 [PULL 00/44] Trivial branch for 5.2 patches Laurent Vivier
                   ` (26 preceding siblings ...)
  2020-09-01 14:09 ` [PULL 27/44] hw/ide/atapi: " Laurent Vivier
@ 2020-09-01 14:09 ` Laurent Vivier
  2020-09-01 14:09 ` [PULL 29/44] hw/scsi/scsi-disk: " Laurent Vivier
                   ` (15 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Laurent Vivier @ 2020-09-01 14:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Li Qiang, Richard Henderson, Laurent Vivier,
	Philippe Mathieu-Daudé,
	Stefano Garzarella

From: Philippe Mathieu-Daudé <f4bug@amsat.org>

Use self-explicit definitions instead of magic '512' value.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Message-Id: <20200814082841.27000-7-f4bug@amsat.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/ide/pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/ide/pci.c b/hw/ide/pci.c
index 5e85c4ad17e0..b50091b615cb 100644
--- a/hw/ide/pci.c
+++ b/hw/ide/pci.c
@@ -138,7 +138,7 @@ static int32_t bmdma_prepare_buf(const IDEDMA *dma, int32_t limit)
     int l, len;
 
     pci_dma_sglist_init(&s->sg, pci_dev,
-                        s->nsector / (BMDMA_PAGE_SIZE / 512) + 1);
+                        s->nsector / (BMDMA_PAGE_SIZE / BDRV_SECTOR_SIZE) + 1);
     s->io_buffer_size = 0;
     for(;;) {
         if (bm->cur_prd_len == 0) {
-- 
2.26.2



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

* [PULL 29/44] hw/scsi/scsi-disk: Replace magic '512' value by BDRV_SECTOR_SIZE
  2020-09-01 14:09 [PULL 00/44] Trivial branch for 5.2 patches Laurent Vivier
                   ` (27 preceding siblings ...)
  2020-09-01 14:09 ` [PULL 28/44] hw/ide/pci: " Laurent Vivier
@ 2020-09-01 14:09 ` Laurent Vivier
  2020-09-01 14:09 ` [PULL 30/44] hw/net/xilinx_axienet: Remove unused code Laurent Vivier
                   ` (14 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Laurent Vivier @ 2020-09-01 14:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, qemu-trivial, Li Qiang, Richard Henderson,
	Laurent Vivier, Philippe Mathieu-Daudé,
	Stefano Garzarella

From: Philippe Mathieu-Daudé <f4bug@amsat.org>

Use self-explicit definitions instead of magic '512' value.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Message-Id: <20200814082841.27000-8-f4bug@amsat.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/scsi/scsi-disk.c | 44 +++++++++++++++++++++++---------------------
 1 file changed, 23 insertions(+), 21 deletions(-)

diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c
index 8ce68a9dd64a..7612035a4e4b 100644
--- a/hw/scsi/scsi-disk.c
+++ b/hw/scsi/scsi-disk.c
@@ -71,7 +71,7 @@ typedef struct SCSIDiskClass {
 
 typedef struct SCSIDiskReq {
     SCSIRequest req;
-    /* Both sector and sector_count are in terms of qemu 512 byte blocks.  */
+    /* Both sector and sector_count are in terms of BDRV_SECTOR_SIZE bytes.  */
     uint64_t sector;
     uint32_t sector_count;
     uint32_t buflen;
@@ -141,7 +141,7 @@ static void scsi_init_iovec(SCSIDiskReq *r, size_t size)
         r->buflen = size;
         r->iov.iov_base = blk_blockalign(s->qdev.conf.blk, r->buflen);
     }
-    r->iov.iov_len = MIN(r->sector_count * 512, r->buflen);
+    r->iov.iov_len = MIN(r->sector_count * BDRV_SECTOR_SIZE, r->buflen);
     qemu_iovec_init_external(&r->qiov, &r->iov, 1);
 }
 
@@ -311,7 +311,7 @@ static void scsi_read_complete_noio(SCSIDiskReq *r, int ret)
         goto done;
     }
 
-    n = r->qiov.size / 512;
+    n = r->qiov.size / BDRV_SECTOR_SIZE;
     r->sector += n;
     r->sector_count -= n;
     scsi_req_data(&r->req, r->qiov.size);
@@ -505,7 +505,7 @@ static void scsi_write_complete_noio(SCSIDiskReq *r, int ret)
         goto done;
     }
 
-    n = r->qiov.size / 512;
+    n = r->qiov.size / BDRV_SECTOR_SIZE;
     r->sector += n;
     r->sector_count -= n;
     if (r->sector_count == 0) {
@@ -1284,7 +1284,7 @@ static int scsi_disk_emulate_mode_sense(SCSIDiskReq *r, uint8_t *outbuf)
         } else { /* MODE_SENSE_10 */
             outbuf[7] = 8; /* Block descriptor length  */
         }
-        nb_sectors /= (s->qdev.blocksize / 512);
+        nb_sectors /= (s->qdev.blocksize / BDRV_SECTOR_SIZE);
         if (nb_sectors > 0xffffff) {
             nb_sectors = 0;
         }
@@ -1342,7 +1342,7 @@ static int scsi_disk_emulate_read_toc(SCSIRequest *req, uint8_t *outbuf)
     start_track = req->cmd.buf[6];
     blk_get_geometry(s->qdev.conf.blk, &nb_sectors);
     trace_scsi_disk_emulate_read_toc(start_track, format, msf >> 1);
-    nb_sectors /= s->qdev.blocksize / 512;
+    nb_sectors /= s->qdev.blocksize / BDRV_SECTOR_SIZE;
     switch (format) {
     case 0:
         toclen = cdrom_read_toc(nb_sectors, outbuf, msf, start_track);
@@ -1738,9 +1738,10 @@ static void scsi_write_same_complete(void *opaque, int ret)
 
     block_acct_done(blk_get_stats(s->qdev.conf.blk), &r->acct);
 
-    data->nb_sectors -= data->iov.iov_len / 512;
-    data->sector += data->iov.iov_len / 512;
-    data->iov.iov_len = MIN(data->nb_sectors * 512, data->iov.iov_len);
+    data->nb_sectors -= data->iov.iov_len / BDRV_SECTOR_SIZE;
+    data->sector += data->iov.iov_len / BDRV_SECTOR_SIZE;
+    data->iov.iov_len = MIN(data->nb_sectors * BDRV_SECTOR_SIZE,
+                            data->iov.iov_len);
     if (data->iov.iov_len) {
         block_acct_start(blk_get_stats(s->qdev.conf.blk), &r->acct,
                          data->iov.iov_len, BLOCK_ACCT_WRITE);
@@ -1805,9 +1806,10 @@ static void scsi_disk_emulate_write_same(SCSIDiskReq *r, uint8_t *inbuf)
 
     data = g_new0(WriteSameCBData, 1);
     data->r = r;
-    data->sector = r->req.cmd.lba * (s->qdev.blocksize / 512);
-    data->nb_sectors = nb_sectors * (s->qdev.blocksize / 512);
-    data->iov.iov_len = MIN(data->nb_sectors * 512, SCSI_WRITE_SAME_MAX);
+    data->sector = r->req.cmd.lba * (s->qdev.blocksize / BDRV_SECTOR_SIZE);
+    data->nb_sectors = nb_sectors * (s->qdev.blocksize / BDRV_SECTOR_SIZE);
+    data->iov.iov_len = MIN(data->nb_sectors * BDRV_SECTOR_SIZE,
+                            SCSI_WRITE_SAME_MAX);
     data->iov.iov_base = buf = blk_blockalign(s->qdev.conf.blk,
                                               data->iov.iov_len);
     qemu_iovec_init_external(&data->qiov, &data->iov, 1);
@@ -1980,7 +1982,7 @@ static int32_t scsi_disk_emulate_command(SCSIRequest *req, uint8_t *buf)
         if ((req->cmd.buf[8] & 1) == 0 && req->cmd.lba) {
             goto illegal_request;
         }
-        nb_sectors /= s->qdev.blocksize / 512;
+        nb_sectors /= s->qdev.blocksize / BDRV_SECTOR_SIZE;
         /* Returned value is the address of the last sector.  */
         nb_sectors--;
         /* Remember the new size for read/write sanity checking. */
@@ -2049,7 +2051,7 @@ static int32_t scsi_disk_emulate_command(SCSIRequest *req, uint8_t *buf)
             if ((req->cmd.buf[14] & 1) == 0 && req->cmd.lba) {
                 goto illegal_request;
             }
-            nb_sectors /= s->qdev.blocksize / 512;
+            nb_sectors /= s->qdev.blocksize / BDRV_SECTOR_SIZE;
             /* Returned value is the address of the last sector.  */
             nb_sectors--;
             /* Remember the new size for read/write sanity checking. */
@@ -2180,8 +2182,8 @@ static int32_t scsi_disk_dma_command(SCSIRequest *req, uint8_t *buf)
         if (!check_lba_range(s, r->req.cmd.lba, len)) {
             goto illegal_lba;
         }
-        r->sector = r->req.cmd.lba * (s->qdev.blocksize / 512);
-        r->sector_count = len * (s->qdev.blocksize / 512);
+        r->sector = r->req.cmd.lba * (s->qdev.blocksize / BDRV_SECTOR_SIZE);
+        r->sector_count = len * (s->qdev.blocksize / BDRV_SECTOR_SIZE);
         break;
     case WRITE_6:
     case WRITE_10:
@@ -2211,8 +2213,8 @@ static int32_t scsi_disk_dma_command(SCSIRequest *req, uint8_t *buf)
         if (!check_lba_range(s, r->req.cmd.lba, len)) {
             goto illegal_lba;
         }
-        r->sector = r->req.cmd.lba * (s->qdev.blocksize / 512);
-        r->sector_count = len * (s->qdev.blocksize / 512);
+        r->sector = r->req.cmd.lba * (s->qdev.blocksize / BDRV_SECTOR_SIZE);
+        r->sector_count = len * (s->qdev.blocksize / BDRV_SECTOR_SIZE);
         break;
     default:
         abort();
@@ -2229,9 +2231,9 @@ static int32_t scsi_disk_dma_command(SCSIRequest *req, uint8_t *buf)
     }
     assert(r->iov.iov_len == 0);
     if (r->req.cmd.mode == SCSI_XFER_TO_DEV) {
-        return -r->sector_count * 512;
+        return -r->sector_count * BDRV_SECTOR_SIZE;
     } else {
-        return r->sector_count * 512;
+        return r->sector_count * BDRV_SECTOR_SIZE;
     }
 }
 
@@ -2243,7 +2245,7 @@ static void scsi_disk_reset(DeviceState *dev)
     scsi_device_purge_requests(&s->qdev, SENSE_CODE(RESET));
 
     blk_get_geometry(s->qdev.conf.blk, &nb_sectors);
-    nb_sectors /= s->qdev.blocksize / 512;
+    nb_sectors /= s->qdev.blocksize / BDRV_SECTOR_SIZE;
     if (nb_sectors) {
         nb_sectors--;
     }
-- 
2.26.2



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

* [PULL 30/44] hw/net/xilinx_axienet: Remove unused code
  2020-09-01 14:09 [PULL 00/44] Trivial branch for 5.2 patches Laurent Vivier
                   ` (28 preceding siblings ...)
  2020-09-01 14:09 ` [PULL 29/44] hw/scsi/scsi-disk: " Laurent Vivier
@ 2020-09-01 14:09 ` Laurent Vivier
  2020-09-01 14:09 ` [PULL 31/44] util/vfio-helpers: Unify trace-events size format Laurent Vivier
                   ` (13 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Laurent Vivier @ 2020-09-01 14:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Edgar E . Iglesias, Alistair Francis,
	Laurent Vivier, Philippe Mathieu-Daudé

From: Philippe Mathieu-Daudé <f4bug@amsat.org>

Most of the MDIOBus fields are unused.  The ADVERTISE_10HALF
definition is unused.  Remove unused code.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Message-Id: <20200814133007.16850-1-f4bug@amsat.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/net/xilinx_axienet.c | 23 -----------------------
 1 file changed, 23 deletions(-)

diff --git a/hw/net/xilinx_axienet.c b/hw/net/xilinx_axienet.c
index 1e48eb70c9cc..2e89f236b4ab 100644
--- a/hw/net/xilinx_axienet.c
+++ b/hw/net/xilinx_axienet.c
@@ -54,7 +54,6 @@
      TYPE_XILINX_AXI_ENET_CONTROL_STREAM)
 
 /* Advertisement control register. */
-#define ADVERTISE_10HALF        0x0020  /* Try for 10mbps half-duplex  */
 #define ADVERTISE_10FULL        0x0040  /* Try for 10mbps full-duplex  */
 #define ADVERTISE_100HALF       0x0080  /* Try for 100mbps half-duplex */
 #define ADVERTISE_100FULL       0x0100  /* Try for 100mbps full-duplex */
@@ -169,28 +168,6 @@ tdk_init(struct PHY *phy)
 }
 
 struct MDIOBus {
-    /* bus.  */
-    int mdc;
-    int mdio;
-
-    /* decoder.  */
-    enum {
-        PREAMBLE,
-        SOF,
-        OPC,
-        ADDR,
-        REQ,
-        TURNAROUND,
-        DATA
-    } state;
-    unsigned int drive;
-
-    unsigned int cnt;
-    unsigned int addr;
-    unsigned int opc;
-    unsigned int req;
-    unsigned int data;
-
     struct PHY *devs[32];
 };
 
-- 
2.26.2



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

* [PULL 31/44] util/vfio-helpers: Unify trace-events size format
  2020-09-01 14:09 [PULL 00/44] Trivial branch for 5.2 patches Laurent Vivier
                   ` (29 preceding siblings ...)
  2020-09-01 14:09 ` [PULL 30/44] hw/net/xilinx_axienet: Remove unused code Laurent Vivier
@ 2020-09-01 14:09 ` Laurent Vivier
  2020-09-01 14:09 ` [PULL 32/44] linux-user: Add strace support for printing OFD fcntl operations Laurent Vivier
                   ` (12 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Laurent Vivier @ 2020-09-01 14:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Li Qiang, Cornelia Huck,
	Philippe Mathieu-Daudé,
	Laurent Vivier

From: Philippe Mathieu-Daudé <philmd@redhat.com>

Some 'qemu_vfio_*' trace events sizes are displayed using
decimal notation, other using hexadecimal notation:

  qemu_vfio_ram_block_added s 0xaaaaf2448d90 host 0xffff5bc00000 size 0x4000000
  qemu_vfio_dma_map s 0xaaaaf2448d90 host 0xffff5bc00000 size 67108864 temporary 0 iova (nil)
  qemu_vfio_find_mapping s 0xaaaaf2448d90 host 0xffff5bc00000
  qemu_vfio_new_mapping s 0xaaaaf2448d90 host 0xffff5bc00000 size 67108864 index 4 iova 0x114000
  qemu_vfio_do_mapping s 0xaaaaf2448d90 host 0xffff5bc00000 size 67108864 iova 0x114000

As it is hard to follow, unify using hexadecimal for all sizes:

  qemu_vfio_ram_block_added s 0xaaaaf1c60d90 host 0xffff2bc00000 size 0x4000000
  qemu_vfio_dma_map s 0xaaaaf1c60d90 host 0xffff2bc00000 size 0x4000000 temporary 0 iova (nil)
  qemu_vfio_find_mapping s 0xaaaaf1c60d90 host 0xffff2bc00000
  qemu_vfio_new_mapping s 0xaaaaf1c60d90 host 0xffff2bc00000 size 0x4000000 index 4 iova 0x114000
  qemu_vfio_do_mapping s 0xaaaaf1c60d90 host 0xffff2bc00000 size 0x4000000 iova 0x114000

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
Message-Id: <20200820171006.1140228-1-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 util/trace-events | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/util/trace-events b/util/trace-events
index 0ce42822eba9..d9a0b4f8c63a 100644
--- a/util/trace-events
+++ b/util/trace-events
@@ -79,7 +79,7 @@ qemu_vfio_dma_reset_temporary(void *s) "s %p"
 qemu_vfio_ram_block_added(void *s, void *p, size_t size) "s %p host %p size 0x%zx"
 qemu_vfio_ram_block_removed(void *s, void *p, size_t size) "s %p host %p size 0x%zx"
 qemu_vfio_find_mapping(void *s, void *p) "s %p host %p"
-qemu_vfio_new_mapping(void *s, void *host, size_t size, int index, uint64_t iova) "s %p host %p size %zu index %d iova 0x%"PRIx64
-qemu_vfio_do_mapping(void *s, void *host, size_t size, uint64_t iova) "s %p host %p size %zu iova 0x%"PRIx64
-qemu_vfio_dma_map(void *s, void *host, size_t size, bool temporary, uint64_t *iova) "s %p host %p size %zu temporary %d iova %p"
+qemu_vfio_new_mapping(void *s, void *host, size_t size, int index, uint64_t iova) "s %p host %p size 0x%zx index %d iova 0x%"PRIx64
+qemu_vfio_do_mapping(void *s, void *host, size_t size, uint64_t iova) "s %p host %p size 0x%zx iova 0x%"PRIx64
+qemu_vfio_dma_map(void *s, void *host, size_t size, bool temporary, uint64_t *iova) "s %p host %p size 0x%zx temporary %d iova %p"
 qemu_vfio_dma_unmap(void *s, void *host) "s %p host %p"
-- 
2.26.2



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

* [PULL 32/44] linux-user: Add strace support for printing OFD fcntl operations
  2020-09-01 14:09 [PULL 00/44] Trivial branch for 5.2 patches Laurent Vivier
                   ` (30 preceding siblings ...)
  2020-09-01 14:09 ` [PULL 31/44] util/vfio-helpers: Unify trace-events size format Laurent Vivier
@ 2020-09-01 14:09 ` Laurent Vivier
  2020-09-01 14:09 ` [PULL 33/44] hw/arm/virt-acpi-build:Remove dead assignment in build_madt() Laurent Vivier
                   ` (11 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Laurent Vivier @ 2020-09-01 14:09 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Mike Gelfand, Laurent Vivier

From: Mike Gelfand <mikedld@mikedld.com>

Signed-off-by: Mike Gelfand <mikedld@mikedld.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20200830092242.31506-1-mikedld@mikedld.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 linux-user/strace.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/linux-user/strace.c b/linux-user/strace.c
index 4f77b0cf76eb..11fea14fba2e 100644
--- a/linux-user/strace.c
+++ b/linux-user/strace.c
@@ -2056,6 +2056,18 @@ print_fcntl(void *cpu_env, const struct syscallname *name,
         print_pointer(arg2, 1);
         break;
 #endif
+    case TARGET_F_OFD_GETLK:
+        qemu_log("F_OFD_GETLK,");
+        print_pointer(arg2, 1);
+        break;
+    case TARGET_F_OFD_SETLK:
+        qemu_log("F_OFD_SETLK,");
+        print_pointer(arg2, 1);
+        break;
+    case TARGET_F_OFD_SETLKW:
+        qemu_log("F_OFD_SETLKW,");
+        print_pointer(arg2, 1);
+        break;
     case TARGET_F_SETLEASE:
         qemu_log("F_SETLEASE,");
         print_raw_param(TARGET_ABI_FMT_ld, arg2, 0);
-- 
2.26.2



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

* [PULL 33/44] hw/arm/virt-acpi-build:Remove dead assignment in build_madt()
  2020-09-01 14:09 [PULL 00/44] Trivial branch for 5.2 patches Laurent Vivier
                   ` (31 preceding siblings ...)
  2020-09-01 14:09 ` [PULL 32/44] linux-user: Add strace support for printing OFD fcntl operations Laurent Vivier
@ 2020-09-01 14:09 ` Laurent Vivier
  2020-09-01 14:09 ` [PULL 34/44] hw/arm/omap1:Remove redundant statement in omap_clkdsp_read() Laurent Vivier
                   ` (10 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Laurent Vivier @ 2020-09-01 14:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: Michael S . Tsirkin, qemu-trivial, Euler Robot, Li Qiang,
	Laurent Vivier, Igor Mammedov, Chen Qun

From: Chen Qun <kuhn.chenqun@huawei.com>

Clang static code analyzer show warning:
hw/arm/virt-acpi-build.c:641:5: warning: Value stored to 'madt' is never read
    madt = acpi_data_push(table_data, sizeof *madt);
    ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20200827110311.164316-2-kuhn.chenqun@huawei.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/arm/virt-acpi-build.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c
index 0a482ff6f734..9efd7a388150 100644
--- a/hw/arm/virt-acpi-build.c
+++ b/hw/arm/virt-acpi-build.c
@@ -633,12 +633,11 @@ build_madt(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms)
     int madt_start = table_data->len;
     const MemMapEntry *memmap = vms->memmap;
     const int *irqmap = vms->irqmap;
-    AcpiMultipleApicTable *madt;
     AcpiMadtGenericDistributor *gicd;
     AcpiMadtGenericMsiFrame *gic_msi;
     int i;
 
-    madt = acpi_data_push(table_data, sizeof *madt);
+    acpi_data_push(table_data, sizeof(AcpiMultipleApicTable));
 
     gicd = acpi_data_push(table_data, sizeof *gicd);
     gicd->type = ACPI_APIC_GENERIC_DISTRIBUTOR;
-- 
2.26.2



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

* [PULL 34/44] hw/arm/omap1:Remove redundant statement in omap_clkdsp_read()
  2020-09-01 14:09 [PULL 00/44] Trivial branch for 5.2 patches Laurent Vivier
                   ` (32 preceding siblings ...)
  2020-09-01 14:09 ` [PULL 33/44] hw/arm/virt-acpi-build:Remove dead assignment in build_madt() Laurent Vivier
@ 2020-09-01 14:09 ` Laurent Vivier
  2020-09-01 14:09 ` [PULL 35/44] target/arm/translate-a64:Remove dead assignment in handle_scalar_simd_shli() Laurent Vivier
                   ` (9 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Laurent Vivier @ 2020-09-01 14:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, qemu-trivial, Li Qiang, Laurent Vivier,
	Euler Robot, Chen Qun

From: Chen Qun <kuhn.chenqun@huawei.com>

Clang static code analyzer show warning:
hw/arm/omap1.c:1760:15: warning: Value stored to 'cpu' during its
initialization is never read
    CPUState *cpu = CPU(s->cpu);
              ^~~   ~~~~~~~~~~~

Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
Message-Id: <20200827110311.164316-3-kuhn.chenqun@huawei.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/arm/omap1.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/hw/arm/omap1.c b/hw/arm/omap1.c
index 6ba0df6b6d09..02c0f66431b9 100644
--- a/hw/arm/omap1.c
+++ b/hw/arm/omap1.c
@@ -1774,7 +1774,6 @@ static uint64_t omap_clkdsp_read(void *opaque, hwaddr addr,
         return s->clkm.dsp_rstct2;
 
     case 0x18:	/* DSP_SYSST */
-        cpu = CPU(s->cpu);
         return (s->clkm.clocking_scheme << 11) | s->clkm.cold_start |
                 (cpu->halted << 6);      /* Quite useless... */
     }
-- 
2.26.2



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

* [PULL 35/44] target/arm/translate-a64:Remove dead assignment in handle_scalar_simd_shli()
  2020-09-01 14:09 [PULL 00/44] Trivial branch for 5.2 patches Laurent Vivier
                   ` (33 preceding siblings ...)
  2020-09-01 14:09 ` [PULL 34/44] hw/arm/omap1:Remove redundant statement in omap_clkdsp_read() Laurent Vivier
@ 2020-09-01 14:09 ` Laurent Vivier
  2020-09-01 14:09 ` [PULL 36/44] target/arm/translate-a64:Remove redundant statement in disas_simd_two_reg_misc_fp16() Laurent Vivier
                   ` (8 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Laurent Vivier @ 2020-09-01 14:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Chen Qun, Peter Maydell, Laurent Vivier, Euler Robot

From: Chen Qun <kuhn.chenqun@huawei.com>

Clang static code analyzer show warning:
target/arm/translate-a64.c:8635:14: warning: Value stored to 'tcg_rn' during its
 initialization is never read
    TCGv_i64 tcg_rn = new_tmp_a64(s);
             ^~~~~~   ~~~~~~~~~~~~~~
target/arm/translate-a64.c:8636:14: warning: Value stored to 'tcg_rd' during its
 initialization is never read
    TCGv_i64 tcg_rd = new_tmp_a64(s);
             ^~~~~~   ~~~~~~~~~~~~~~

Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20200827110311.164316-4-kuhn.chenqun@huawei.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 target/arm/translate-a64.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c
index 4ba6918b6063..1fc3b2273207 100644
--- a/target/arm/translate-a64.c
+++ b/target/arm/translate-a64.c
@@ -8631,8 +8631,8 @@ static void handle_scalar_simd_shli(DisasContext *s, bool insert,
     int size = 32 - clz32(immh) - 1;
     int immhb = immh << 3 | immb;
     int shift = immhb - (8 << size);
-    TCGv_i64 tcg_rn = new_tmp_a64(s);
-    TCGv_i64 tcg_rd = new_tmp_a64(s);
+    TCGv_i64 tcg_rn;
+    TCGv_i64 tcg_rd;
 
     if (!extract32(immh, 3, 1)) {
         unallocated_encoding(s);
-- 
2.26.2



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

* [PULL 36/44] target/arm/translate-a64:Remove redundant statement in disas_simd_two_reg_misc_fp16()
  2020-09-01 14:09 [PULL 00/44] Trivial branch for 5.2 patches Laurent Vivier
                   ` (34 preceding siblings ...)
  2020-09-01 14:09 ` [PULL 35/44] target/arm/translate-a64:Remove dead assignment in handle_scalar_simd_shli() Laurent Vivier
@ 2020-09-01 14:09 ` Laurent Vivier
  2020-09-01 14:09 ` [PULL 37/44] hw/virtio/vhost-user:Remove dead assignment in scrub_shadow_regions() Laurent Vivier
                   ` (7 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Laurent Vivier @ 2020-09-01 14:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Chen Qun, Peter Maydell, Laurent Vivier, Euler Robot

From: Chen Qun <kuhn.chenqun@huawei.com>

Clang static code analyzer show warning:
target/arm/translate-a64.c:13007:5: warning: Value stored to 'rd' is never read
    rd = extract32(insn, 0, 5);
    ^    ~~~~~~~~~~~~~~~~~~~~~
target/arm/translate-a64.c:13008:5: warning: Value stored to 'rn' is never read
    rn = extract32(insn, 5, 5);
    ^    ~~~~~~~~~~~~~~~~~~~~~

Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20200827110311.164316-5-kuhn.chenqun@huawei.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 target/arm/translate-a64.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c
index 1fc3b2273207..71888083417d 100644
--- a/target/arm/translate-a64.c
+++ b/target/arm/translate-a64.c
@@ -13014,9 +13014,6 @@ static void disas_simd_two_reg_misc_fp16(DisasContext *s, uint32_t insn)
     fpop = deposit32(opcode, 5, 1, a);
     fpop = deposit32(fpop, 6, 1, u);
 
-    rd = extract32(insn, 0, 5);
-    rn = extract32(insn, 5, 5);
-
     switch (fpop) {
     case 0x1d: /* SCVTF */
     case 0x5d: /* UCVTF */
-- 
2.26.2



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

* [PULL 37/44] hw/virtio/vhost-user:Remove dead assignment in scrub_shadow_regions()
  2020-09-01 14:09 [PULL 00/44] Trivial branch for 5.2 patches Laurent Vivier
                   ` (35 preceding siblings ...)
  2020-09-01 14:09 ` [PULL 36/44] target/arm/translate-a64:Remove redundant statement in disas_simd_two_reg_misc_fp16() Laurent Vivier
@ 2020-09-01 14:09 ` Laurent Vivier
  2020-09-01 14:09 ` [PULL 38/44] hw/net/virtio-net:Remove redundant statement in virtio_net_rsc_tcp_ctrl_check() Laurent Vivier
                   ` (6 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Laurent Vivier @ 2020-09-01 14:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: Michael S . Tsirkin, qemu-trivial, Laurent Vivier,
	Raphael Norwitz, Euler Robot, Chen Qun

From: Chen Qun <kuhn.chenqun@huawei.com>

Clang static code analyzer show warning:
hw/virtio/vhost-user.c:606:9: warning: Value stored to 'mr' is never read
        mr = vhost_user_get_mr_data(reg->userspace_addr, &offset, &fd);
        ^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
Reviewed-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20200827110311.164316-6-kuhn.chenqun@huawei.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/virtio/vhost-user.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
index d7e24237625f..9c5b4f7fbcda 100644
--- a/hw/virtio/vhost-user.c
+++ b/hw/virtio/vhost-user.c
@@ -603,7 +603,7 @@ static void scrub_shadow_regions(struct vhost_dev *dev,
      */
     for (i = 0; i < dev->mem->nregions; i++) {
         reg = &dev->mem->regions[i];
-        mr = vhost_user_get_mr_data(reg->userspace_addr, &offset, &fd);
+        vhost_user_get_mr_data(reg->userspace_addr, &offset, &fd);
         if (fd > 0) {
             ++fd_num;
         }
-- 
2.26.2



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

* [PULL 38/44] hw/net/virtio-net:Remove redundant statement in virtio_net_rsc_tcp_ctrl_check()
  2020-09-01 14:09 [PULL 00/44] Trivial branch for 5.2 patches Laurent Vivier
                   ` (36 preceding siblings ...)
  2020-09-01 14:09 ` [PULL 37/44] hw/virtio/vhost-user:Remove dead assignment in scrub_shadow_regions() Laurent Vivier
@ 2020-09-01 14:09 ` Laurent Vivier
  2020-09-01 14:09 ` [PULL 39/44] vfio/platform: Remove dead assignment in vfio_intp_interrupt() Laurent Vivier
                   ` (5 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Laurent Vivier @ 2020-09-01 14:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: Michael S . Tsirkin, qemu-trivial, Li Qiang, Laurent Vivier,
	Euler Robot, Chen Qun, Philippe Mathieu-Daudé

From: Chen Qun <kuhn.chenqun@huawei.com>

Clang static code analyzer show warning:
hw/net/virtio-net.c:2077:5: warning: Value stored to 'tcp_flag' is never read
    tcp_flag &= VIRTIO_NET_TCP_FLAG;
    ^           ~~~~~~~~~~~~~~~~~~~

The 'VIRTIO_NET_TCP_FLAG' is '0x3F'. The last ‘tcp_flag’ assignment statement is
 the same as that of the first two statements.

Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20200827110311.164316-7-kuhn.chenqun@huawei.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/net/virtio-net.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index a1fe9e928533..cb0d27084c10 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -2075,7 +2075,6 @@ static int virtio_net_rsc_tcp_ctrl_check(VirtioNetRscChain *chain,
     tcp_flag = htons(tcp->th_offset_flags);
     tcp_hdr = (tcp_flag & VIRTIO_NET_TCP_HDR_LENGTH) >> 10;
     tcp_flag &= VIRTIO_NET_TCP_FLAG;
-    tcp_flag = htons(tcp->th_offset_flags) & 0x3F;
     if (tcp_flag & TH_SYN) {
         chain->stat.tcp_syn++;
         return RSC_BYPASS;
-- 
2.26.2



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

* [PULL 39/44] vfio/platform: Remove dead assignment in vfio_intp_interrupt()
  2020-09-01 14:09 [PULL 00/44] Trivial branch for 5.2 patches Laurent Vivier
                   ` (37 preceding siblings ...)
  2020-09-01 14:09 ` [PULL 38/44] hw/net/virtio-net:Remove redundant statement in virtio_net_rsc_tcp_ctrl_check() Laurent Vivier
@ 2020-09-01 14:09 ` Laurent Vivier
  2020-09-01 14:09 ` [PULL 40/44] usb/bus: Remove dead assignment in usb_get_fw_dev_path() Laurent Vivier
                   ` (4 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Laurent Vivier @ 2020-09-01 14:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Li Qiang, Laurent Vivier, Eric Auger,
	Stefan Hajnoczi, Euler Robot, Chen Qun

From: Chen Qun <kuhn.chenqun@huawei.com>

Clang static code analyzer show warning:
hw/vfio/platform.c:239:9: warning: Value stored to 'ret' is never read
        ret = event_notifier_test_and_clear(intp->interrupt);
        ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
Message-Id: <20200827110311.164316-8-kuhn.chenqun@huawei.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/vfio/platform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c
index ac2cefc9b184..869ed2c39dcd 100644
--- a/hw/vfio/platform.c
+++ b/hw/vfio/platform.c
@@ -236,7 +236,7 @@ static void vfio_intp_interrupt(VFIOINTp *intp)
         trace_vfio_intp_interrupt_set_pending(intp->pin);
         QSIMPLEQ_INSERT_TAIL(&vdev->pending_intp_queue,
                              intp, pqnext);
-        ret = event_notifier_test_and_clear(intp->interrupt);
+        event_notifier_test_and_clear(intp->interrupt);
         return;
     }
 
-- 
2.26.2



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

* [PULL 40/44] usb/bus: Remove dead assignment in usb_get_fw_dev_path()
  2020-09-01 14:09 [PULL 00/44] Trivial branch for 5.2 patches Laurent Vivier
                   ` (38 preceding siblings ...)
  2020-09-01 14:09 ` [PULL 39/44] vfio/platform: Remove dead assignment in vfio_intp_interrupt() Laurent Vivier
@ 2020-09-01 14:09 ` Laurent Vivier
  2020-09-01 14:09 ` [PULL 41/44] hw/intc: fix default registers value in exynos4210_combiner_read() Laurent Vivier
                   ` (3 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Laurent Vivier @ 2020-09-01 14:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Laurent Vivier, Markus Armbruster, Gerd Hoffmann,
	Euler Robot, Chen Qun

From: Chen Qun <kuhn.chenqun@huawei.com>

Clang static code analyzer show warning:
qemu/hw/usb/bus.c:615:13: warning: Value stored to 'pos' is never read
            pos += snprintf(fw_path + pos, fw_len - pos, "%s@%lx",

Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20200827110311.164316-9-kuhn.chenqun@huawei.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/usb/bus.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/usb/bus.c b/hw/usb/bus.c
index b17bda3b29ef..2b1104145157 100644
--- a/hw/usb/bus.c
+++ b/hw/usb/bus.c
@@ -612,8 +612,8 @@ static char *usb_get_fw_dev_path(DeviceState *qdev)
             in++;
         } else {
             /* the device itself */
-            pos += snprintf(fw_path + pos, fw_len - pos, "%s@%lx",
-                            qdev_fw_name(qdev), nr);
+            snprintf(fw_path + pos, fw_len - pos, "%s@%lx",
+                     qdev_fw_name(qdev), nr);
             break;
         }
     }
-- 
2.26.2



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

* [PULL 41/44] hw/intc: fix default registers value in exynos4210_combiner_read()
  2020-09-01 14:09 [PULL 00/44] Trivial branch for 5.2 patches Laurent Vivier
                   ` (39 preceding siblings ...)
  2020-09-01 14:09 ` [PULL 40/44] usb/bus: Remove dead assignment in usb_get_fw_dev_path() Laurent Vivier
@ 2020-09-01 14:09 ` Laurent Vivier
  2020-09-01 14:09 ` [PULL 42/44] hw/display/vga:Remove redundant statement in vga_draw_graphic() Laurent Vivier
                   ` (2 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: Laurent Vivier @ 2020-09-01 14:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Chen Qun, Peter Maydell, Laurent Vivier, Euler Robot

From: Chen Qun <kuhn.chenqun@huawei.com>

Clang static code analyzer show warning:
hw/intc/exynos4210_combiner.c:231:9: warning: Value stored to 'val' is never read
        val = s->reg_set[offset >> 2];

The default register return value should be return 'val'.

Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20200827110311.164316-10-kuhn.chenqun@huawei.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/intc/exynos4210_combiner.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/hw/intc/exynos4210_combiner.c b/hw/intc/exynos4210_combiner.c
index b8561e418037..59dd27fb16e5 100644
--- a/hw/intc/exynos4210_combiner.c
+++ b/hw/intc/exynos4210_combiner.c
@@ -229,7 +229,6 @@ exynos4210_combiner_read(void *opaque, hwaddr offset, unsigned size)
                     TARGET_FMT_plx "offset\n", offset);
         }
         val = s->reg_set[offset >> 2];
-        return 0;
     }
     return val;
 }
-- 
2.26.2



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

* [PULL 42/44] hw/display/vga:Remove redundant statement in vga_draw_graphic()
  2020-09-01 14:09 [PULL 00/44] Trivial branch for 5.2 patches Laurent Vivier
                   ` (40 preceding siblings ...)
  2020-09-01 14:09 ` [PULL 41/44] hw/intc: fix default registers value in exynos4210_combiner_read() Laurent Vivier
@ 2020-09-01 14:09 ` Laurent Vivier
  2020-09-01 14:09 ` [PULL 43/44] main-loop: Fix comment Laurent Vivier
  2020-09-01 14:09 ` [PULL 44/44] docs/system: Fix grammar in documentation Laurent Vivier
  43 siblings, 0 replies; 45+ messages in thread
From: Laurent Vivier @ 2020-09-01 14:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Li Qiang, Laurent Vivier, Gerd Hoffmann,
	Euler Robot, Chen Qun

From: Chen Qun <kuhn.chenqun@huawei.com>

Clang static code analyzer show warning:
hw/display/vga.c:1677:9: warning: Value stored to 'update' is never read
        update = full_update;
        ^        ~~~~~~~~~~~

Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
Message-Id: <20200827110311.164316-11-kuhn.chenqun@huawei.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/display/vga.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/hw/display/vga.c b/hw/display/vga.c
index 061fd9ab8f6c..836ad50c7b6d 100644
--- a/hw/display/vga.c
+++ b/hw/display/vga.c
@@ -1674,7 +1674,6 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
         if (!(s->cr[VGA_CRTC_MODE] & 2)) {
             addr = (addr & ~0x8000) | ((y1 & 2) << 14);
         }
-        update = full_update;
         page0 = addr & s->vbe_size_mask;
         page1 = (addr + bwidth - 1) & s->vbe_size_mask;
         if (full_update) {
-- 
2.26.2



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

* [PULL 43/44] main-loop: Fix comment
  2020-09-01 14:09 [PULL 00/44] Trivial branch for 5.2 patches Laurent Vivier
                   ` (41 preceding siblings ...)
  2020-09-01 14:09 ` [PULL 42/44] hw/display/vga:Remove redundant statement in vga_draw_graphic() Laurent Vivier
@ 2020-09-01 14:09 ` Laurent Vivier
  2020-09-01 14:09 ` [PULL 44/44] docs/system: Fix grammar in documentation Laurent Vivier
  43 siblings, 0 replies; 45+ messages in thread
From: Laurent Vivier @ 2020-09-01 14:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Stefan Weil, Laurent Vivier, Philippe Mathieu-Daudé

From: Stefan Weil <sw@weilnetz.de>

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20200827175520.32355-1-sw@weilnetz.de>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 include/qemu/main-loop.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/qemu/main-loop.h b/include/qemu/main-loop.h
index 8e98613656ff..d6892fd2081a 100644
--- a/include/qemu/main-loop.h
+++ b/include/qemu/main-loop.h
@@ -52,7 +52,7 @@ int qemu_init_main_loop(Error **errp);
  * repeatedly calls main_loop_wait(false).
  *
  * Main loop services include file descriptor callbacks, bottom halves
- * and timers (defined in qemu-timer.h).  Bottom halves are similar to timers
+ * and timers (defined in qemu/timer.h).  Bottom halves are similar to timers
  * that execute immediately, but have a lower overhead and scheduling them
  * is wait-free, thread-safe and signal-safe.
  *
-- 
2.26.2



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

* [PULL 44/44] docs/system: Fix grammar in documentation
  2020-09-01 14:09 [PULL 00/44] Trivial branch for 5.2 patches Laurent Vivier
                   ` (42 preceding siblings ...)
  2020-09-01 14:09 ` [PULL 43/44] main-loop: Fix comment Laurent Vivier
@ 2020-09-01 14:09 ` Laurent Vivier
  43 siblings, 0 replies; 45+ messages in thread
From: Laurent Vivier @ 2020-09-01 14:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Stefan Weil, Philippe Mathieu-Daudé,
	Laurent Vivier, Peter Maydell

From: Stefan Weil <sw@weilnetz.de>

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20200827173051.31050-1-sw@weilnetz.de>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 docs/system/build-platforms.rst | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/docs/system/build-platforms.rst b/docs/system/build-platforms.rst
index c2b92a96987c..9734eba2f180 100644
--- a/docs/system/build-platforms.rst
+++ b/docs/system/build-platforms.rst
@@ -57,12 +57,12 @@ macOS
 -----
 
 The project supports building with the two most recent versions of
-macOS, with the current homebrew package set available.
+macOS, with the current Homebrew package set available.
 
 FreeBSD
 -------
 
-The project aims to support the all the versions which are not end of
+The project aims to support all versions which are not end of
 life.
 
 NetBSD
@@ -75,5 +75,5 @@ new major version is released.
 OpenBSD
 -------
 
-The project aims to support the all the versions which are not end of
+The project aims to support all versions which are not end of
 life.
-- 
2.26.2



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

end of thread, other threads:[~2020-09-01 14:36 UTC | newest]

Thread overview: 45+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-01 14:09 [PULL 00/44] Trivial branch for 5.2 patches Laurent Vivier
2020-09-01 14:09 ` [PULL 01/44] hw/register: Document register_init_block @memory_size Laurent Vivier
2020-09-01 14:09 ` [PULL 02/44] target/arm/kvm: Remove superfluous break Laurent Vivier
2020-09-01 14:09 ` [PULL 03/44] target/ppc: Remove superfluous breaks Laurent Vivier
2020-09-01 14:09 ` [PULL 04/44] scsi: " Laurent Vivier
2020-09-01 14:09 ` [PULL 05/44] vnc: Remove the superfluous break Laurent Vivier
2020-09-01 14:09 ` [PULL 06/44] block/vmdk: Remove superfluous breaks Laurent Vivier
2020-09-01 14:09 ` [PULL 07/44] hw: " Laurent Vivier
2020-09-01 14:09 ` [PULL 08/44] target/sh4: " Laurent Vivier
2020-09-01 14:09 ` [PULL 09/44] target/cris: " Laurent Vivier
2020-09-01 14:09 ` [PULL 10/44] hw/net/can: Add missing fallthrough statements Laurent Vivier
2020-09-01 14:09 ` [PULL 11/44] hw/i386/kvm/ioapic.c: fix typo in error message Laurent Vivier
2020-09-01 14:09 ` [PULL 12/44] hw/isa/isa-superio: Fix IDE controller realization Laurent Vivier
2020-09-01 14:09 ` [PULL 13/44] stubs/cmos: Use correct include Laurent Vivier
2020-09-01 14:09 ` [PULL 14/44] qemu-options.hx: Fix typo for netdev documentation Laurent Vivier
2020-09-01 14:09 ` [PULL 15/44] hw/core/sysbus: Fix a typo Laurent Vivier
2020-09-01 14:09 ` [PULL 16/44] hw/core/sysbus: Assert memory region index is in range Laurent Vivier
2020-09-01 14:09 ` [PULL 17/44] Revert "mailmap: Update philmd email address" Laurent Vivier
2020-09-01 14:09 ` [PULL 18/44] docs: Fix broken links Laurent Vivier
2020-09-01 14:09 ` [PULL 19/44] .mailmap: Update Paul Burton email address Laurent Vivier
2020-09-01 14:09 ` [PULL 20/44] hw/i2c: Fix typo in description Laurent Vivier
2020-09-01 14:09 ` [PULL 21/44] util/qemu-timer: " Laurent Vivier
2020-09-01 14:09 ` [PULL 22/44] util/vfio-helpers: " Laurent Vivier
2020-09-01 14:09 ` [PULL 23/44] mailmap: Add entry for Greg Kurz Laurent Vivier
2020-09-01 14:09 ` [PULL 24/44] docs/system/target-avr: Improve the AVR docs and add to MAINTAINERS Laurent Vivier
2020-09-01 14:09 ` [PULL 25/44] hw/ide/core: Trivial typo fix Laurent Vivier
2020-09-01 14:09 ` [PULL 26/44] hw/ide/ahci: Replace magic '512' value by BDRV_SECTOR_SIZE Laurent Vivier
2020-09-01 14:09 ` [PULL 27/44] hw/ide/atapi: " Laurent Vivier
2020-09-01 14:09 ` [PULL 28/44] hw/ide/pci: " Laurent Vivier
2020-09-01 14:09 ` [PULL 29/44] hw/scsi/scsi-disk: " Laurent Vivier
2020-09-01 14:09 ` [PULL 30/44] hw/net/xilinx_axienet: Remove unused code Laurent Vivier
2020-09-01 14:09 ` [PULL 31/44] util/vfio-helpers: Unify trace-events size format Laurent Vivier
2020-09-01 14:09 ` [PULL 32/44] linux-user: Add strace support for printing OFD fcntl operations Laurent Vivier
2020-09-01 14:09 ` [PULL 33/44] hw/arm/virt-acpi-build:Remove dead assignment in build_madt() Laurent Vivier
2020-09-01 14:09 ` [PULL 34/44] hw/arm/omap1:Remove redundant statement in omap_clkdsp_read() Laurent Vivier
2020-09-01 14:09 ` [PULL 35/44] target/arm/translate-a64:Remove dead assignment in handle_scalar_simd_shli() Laurent Vivier
2020-09-01 14:09 ` [PULL 36/44] target/arm/translate-a64:Remove redundant statement in disas_simd_two_reg_misc_fp16() Laurent Vivier
2020-09-01 14:09 ` [PULL 37/44] hw/virtio/vhost-user:Remove dead assignment in scrub_shadow_regions() Laurent Vivier
2020-09-01 14:09 ` [PULL 38/44] hw/net/virtio-net:Remove redundant statement in virtio_net_rsc_tcp_ctrl_check() Laurent Vivier
2020-09-01 14:09 ` [PULL 39/44] vfio/platform: Remove dead assignment in vfio_intp_interrupt() Laurent Vivier
2020-09-01 14:09 ` [PULL 40/44] usb/bus: Remove dead assignment in usb_get_fw_dev_path() Laurent Vivier
2020-09-01 14:09 ` [PULL 41/44] hw/intc: fix default registers value in exynos4210_combiner_read() Laurent Vivier
2020-09-01 14:09 ` [PULL 42/44] hw/display/vga:Remove redundant statement in vga_draw_graphic() Laurent Vivier
2020-09-01 14:09 ` [PULL 43/44] main-loop: Fix comment Laurent Vivier
2020-09-01 14:09 ` [PULL 44/44] docs/system: Fix grammar in documentation Laurent Vivier

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.