Trivial branch patches
The following changes since commit 6c599282f8ab382fe59f03a6cae755b89561a7b3:
Merge remote-tracking branch 'remotes/armbru/tags/pull-monitor-2020-02-15-v2' into staging (2020-02-17 13:32:25 +0000)
are available in the Git repository at:
git://github.com/vivier/qemu.git tags/trivial-branch-pull-request
for you to fetch changes up to d1cb67841ca213802ee789957188ec87e8b7996d:
hw/xtensa/xtfpga:fix leak of fdevice tree blob (2020-02-19 10:33:38 +0100)
----------------------------------------------------------------
Fix memory leak with fdt
cosmetic change in code and logs
update mailmap
----------------------------------------------------------------
Chen Qun (2):
hw/nios2:fix leak of fdevice tree blob
hw/xtensa/xtfpga:fix leak of fdevice tree blob
Michal Privoznik (1):
Report stringified errno in VFIO related errors
Philippe Mathieu-Daudé (13):
scripts/checkpatch.pl: Detect superfluous semicolon in C code audio/alsaaudio: Remove superfluous semicolons hw/arm/xlnx-versal: Remove superfluous semicolon hw/m68k/next-cube: Remove superfluous semicolon hw/scsi/esp: Remove superfluous semicolon
hw/vfio/display: Remove superfluous semicolon ui/input-barrier: Remove superfluous semicolon target/i386/whpx: Remove superfluous semicolon tests/qtest/libqos/qgraph: Remove superfluous semicolons contrib/rdmacm-mux: Remove superfluous semicolon hw/display/qxl: Remove unneeded variable assignment hw/block/pflash_cfi02: Remove unneeded variable assignment hw/net/rocker: Report unimplemented feature with qemu_log_mask(UNIMP)
Yu-Chen Lin (1):
mailmap: Add entry for Yu-Chen Lin
.mailmap | 3 ++- audio/alsaaudio.c | 4 ++-- contrib/rdmacm-mux/main.c | 2 +- hw/arm/xlnx-versal-virt.c | 2 +- hw/block/pflash_cfi02.c | 1 - hw/display/qxl.c | 2 +- hw/m68k/next-cube.c | 2 +- hw/net/rocker/rocker.c | 15 +++++++++------ hw/nios2/boot.c | 1 + hw/scsi/esp.c | 2 +- hw/vfio/common.c | 4 ++-- hw/vfio/display.c | 2 +- hw/xtensa/xtfpga.c | 1 + scripts/checkpatch.pl | 5 +++++ target/i386/whpx-all.c | 2 +- tests/qtest/libqos/qgraph.c | 4 ++-- ui/input-barrier.c | 2 +- util/vfio-helpers.c | 6 +++--- 18 files changed, 35 insertions(+), 25 deletions(-)
Signature · 1 line
2.24.1
[PULL 02/17] Report stringified errno in VFIO related errors
From: Michal Privoznik <[email protected]>
In a few places we report errno formatted as a negative integer. This is not as user friendly as it can be. Use strerror() and/or error_setg_errno() instead.
Message-Id: <4949c3ecf1a32189b8a4b5eb4b0fd04c1122501d.1581674006.git.mprivozn@redhat.com>
--- hw/vfio/common.c | 4 ++-- util/vfio-helpers.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-)
hw/vfio/common.c +2 -2
@@ -319,7 +319,7 @@ static int vfio_dma_unmap(VFIOContainer *container, unmap.size -=1ULL <<ctz64 (container->pgsizes);continue ; } -error_report ("VFIO_UNMAP_DMA: %d" , -errno); +error_report ("VFIO_UNMAP_DMA failed: %s" ,strerror (errno));return -errno; }
@@ -352,7 +352,7 @@ static int vfio_dma_map(VFIOContainer *container, hwaddr iova,return 0 ; } -error_report ("VFIO_MAP_DMA: %d" , -errno); +error_report ("VFIO_MAP_DMA failed: %s" ,strerror (errno));return -errno; }
util/vfio-helpers.c +3 -3
@@ -545,7 +545,7 @@ static int qemu_vfio_do_mapping(QEMUVFIOState *s, void *host, size_t size,trace_qemu_vfio_do_mapping (s, host, size, iova);if (ioctl (s->container,VFIO_IOMMU_MAP_DMA , &dma_map)) { -error_report ("VFIO_MAP_DMA: %d" , -errno); +error_report ("VFIO_MAP_DMA failed: %s" ,strerror (errno));return -errno; }return 0 ;
@@ -570,7 +570,7 @@ static void qemu_vfio_undo_mapping(QEMUVFIOState *s, IOVAMapping *mapping,assert (QEMU_IS_ALIGNED (mapping->size, qemu_real_host_page_size));assert (index >=0 && index < s->nr_mappings);if (ioctl (s->container,VFIO_IOMMU_UNMAP_DMA , &unmap)) { -error_setg (errp,"VFIO_UNMAP_DMA failed: %d" , -errno); +error_setg_errno (errp, errno,"VFIO_UNMAP_DMA failed" ); }memmove (mapping, &s->mappings[index +1 ],sizeof (s->mappings[0 ]) * (s->nr_mappings - index -1 ));
@@ -669,7 +669,7 @@ int qemu_vfio_dma_reset_temporary(QEMUVFIOState *s)trace_qemu_vfio_dma_reset_temporary (s);qemu_mutex_lock (&s->lock);if (ioctl (s->container,VFIO_IOMMU_UNMAP_DMA , &unmap)) { -error_report ("VFIO_UNMAP_DMA: %d" , -errno); +error_report ("VFIO_UNMAP_DMA failed: %s" ,strerror (errno));qemu_mutex_unlock (&s->lock);return -errno; }
Signature · 1 line
2.24.1
[PULL 10/17] target/i386/whpx: Remove superfluous semicolon
In reply to Laurent VivierFrom: Philippe Mathieu-Daudé <[email protected]>
Message-Id: <[email protected]>
--- target/i386/whpx-all.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
target/i386/whpx-all.c +1 -1
@@ -511,7 +511,7 @@ static void whpx_get_registers(CPUState *cpu)/* WHvX64RegisterPat - Skipped */ assert (whpx_register_names[idx] == WHvX64RegisterSysenterCs); - env->sysenter_cs = vcxt.values[idx++].Reg64;; + env->sysenter_cs = vcxt.values[idx++].Reg64;assert (whpx_register_names[idx] == WHvX64RegisterSysenterEip); env->sysenter_eip = vcxt.values[idx++].Reg64;assert (whpx_register_names[idx] == WHvX64RegisterSysenterEsp);
Signature · 1 line
2.24.1
[PULL 06/17] hw/m68k/next-cube: Remove superfluous semicolon
In reply to Laurent VivierFrom: Philippe Mathieu-Daudé <[email protected]>
Message-Id: <[email protected]>
--- hw/m68k/next-cube.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/m68k/next-cube.c +1 -1
@@ -734,7 +734,7 @@ void next_irq(void *opaque, int number, int level)switch (number) {/* level 3 - floppy, kbd/mouse, power, ether rx/tx, scsi, clock */ case NEXT_FD_I : - shift =7 ;; + shift =7 ;break ;case NEXT_KBD_I : shift =3 ;
Signature · 1 line
2.24.1
[PULL 07/17] hw/scsi/esp: Remove superfluous semicolon
In reply to Laurent VivierFrom: Philippe Mathieu-Daudé <[email protected]>
Message-Id: <[email protected]>
--- hw/scsi/esp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/scsi/esp.c +1 -1
@@ -293,7 +293,7 @@ static void handle_satn_stop(ESPState *s) s->dma_cb = handle_satn_stop;return ; } - s->pdma_cb = satn_stop_pdma_cb;; + s->pdma_cb = satn_stop_pdma_cb; s->cmdlen =get_cmd (s, s->cmdbuf,sizeof (s->cmdbuf));if (s->cmdlen) {trace_esp_handle_satn_stop (s->cmdlen);
Signature · 1 line
2.24.1
[PULL 13/17] hw/display/qxl: Remove unneeded variable assignment
In reply to Laurent VivierFrom: Philippe Mathieu-Daudé <[email protected]>
Fix warning reported by Clang static code analyzer:
hw/display/qxl.c:1634:14: warning: Value stored to 'orig_io_port' during its initialization is never read
uint32_t orig_io_port = io_port;
^~~~~~~~~~~~ ~~~~~~~Message-Id: <[email protected]>
--- hw/display/qxl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/display/qxl.c +1 -1
@@ -1631,7 +1631,7 @@ static void ioport_write(void *opaque, hwaddr addr,PCIQXLDevice *d = opaque;uint32_t io_port = addr;qxl_async_io async =QXL_SYNC ; -uint32_t orig_io_port = io_port; +uint32_t orig_io_port;if (d->guest_bug && io_port !=QXL_IO_RESET ) {return ;
Signature · 1 line
2.24.1
[PULL 15/17] hw/net/rocker: Report unimplemented feature with qemu_log_mask(UNIMP)
In reply to Laurent VivierFrom: Philippe Mathieu-Daudé <[email protected]>
Fix warnings reported by Clang static code analyzer:
CC hw/net/rocker/rocker.o
hw/net/rocker/rocker.c:213:9: warning: Value stored to 'tx_tso_mss' is never read
tx_tso_mss = rocker_tlv_get_le16(tlvs[ROCKER_TLV_TX_TSO_MSS]);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
hw/net/rocker/rocker.c:217:9: warning: Value stored to 'tx_tso_hdr_len' is never read
tx_tso_hdr_len = rocker_tlv_get_le16(tlvs[ROCKER_TLV_TX_TSO_HDR_LEN]);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
hw/net/rocker/rocker.c:255:9: warning: Value stored to 'tx_l3_csum_off' is never read
tx_l3_csum_off += tx_tso_mss = tx_tso_hdr_len = 0;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Message-Id: <[email protected]>
--- hw/net/rocker/rocker.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-)
hw/net/rocker/rocker.c +9 -6
@@ -27,6 +27,7 @@#include "qemu/iov.h" #include "qemu/module.h" #include "qemu/bitops.h" +#include "qemu/log.h" #include "rocker.h" #include "rocker_hw.h"
@@ -207,14 +208,22 @@ static int tx_consume(Rocker *r, DescInfo *info)if (tlvs[ROCKER_TLV_TX_L3_CSUM_OFF ]) { tx_l3_csum_off =rocker_tlv_get_le16 (tlvs[ROCKER_TLV_TX_L3_CSUM_OFF ]); +qemu_log_mask (LOG_UNIMP ,"rocker %s: L3 not implemented" +" (cksum off: %u)\n" , + __func__, tx_l3_csum_off); }if (tlvs[ROCKER_TLV_TX_TSO_MSS ]) { tx_tso_mss =rocker_tlv_get_le16 (tlvs[ROCKER_TLV_TX_TSO_MSS ]); +qemu_log_mask (LOG_UNIMP ,"rocker %s: TSO not implemented (MSS: %u)\n" , + __func__, tx_tso_mss); }if (tlvs[ROCKER_TLV_TX_TSO_HDR_LEN ]) { tx_tso_hdr_len =rocker_tlv_get_le16 (tlvs[ROCKER_TLV_TX_TSO_HDR_LEN ]); +qemu_log_mask (LOG_UNIMP ,"rocker %s: TSO not implemented" +" (hdr length: %u)\n" , + __func__, tx_tso_hdr_len); }rocker_tlv_for_each_nested (tlv_frag, tlvs[ROCKER_TLV_TX_FRAGS ], rem) {
@@ -249,12 +258,6 @@ static int tx_consume(Rocker *r, DescInfo *info) iovcnt++; } -if (iovcnt) { -/* XXX perform Tx offloads */ -/* XXX silence compiler for now */ - tx_l3_csum_off += tx_tso_mss = tx_tso_hdr_len =0 ; - } - err =fp_port_eg (r->fp_port[port], iov, iovcnt); err_too_many_frags:
Signature · 1 line
2.24.1
[PULL 01/17] mailmap: Add entry for Yu-Chen Lin
In reply to Laurent VivierFrom: Yu-Chen Lin <[email protected]>
I have two mail address, add entries for
showing author and email correctly.
Message-Id: <[email protected]>
--- .mailmap | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
.mailmap +2 -1
@@ -152,7 +152,8 @@ Xiaoqiang Zhao <[email protected]> Xinhua Cao <[email protected]> Xiong Zhang <[email protected]> Yin Yin <[email protected]> -yuchenlin <[email protected]> +Yu-Chen Lin <[email protected]> +Yu-Chen Lin <[email protected]> <[email protected]> YunQiang Su <[email protected]> YunQiang Su <[email protected]> Yuri Pudgorodskiy <[email protected]>
Signature · 1 line
2.24.1
[PULL 12/17] contrib/rdmacm-mux: Remove superfluous semicolon
In reply to Laurent VivierFrom: Philippe Mathieu-Daudé <[email protected]>
Message-Id: <[email protected]>
--- contrib/rdmacm-mux/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
contrib/rdmacm-mux/main.c +1 -1
@@ -490,7 +490,7 @@ static int read_and_process(int fd)static int accept_all (void ) { -int fd, rc =0 ;; +int fd, rc =0 ;pthread_rwlock_wrlock (&server.lock);
Signature · 1 line
2.24.1
[PULL 09/17] ui/input-barrier: Remove superfluous semicolon
In reply to Laurent VivierFrom: Philippe Mathieu-Daudé <[email protected]>
Message-Id: <[email protected]>
--- ui/input-barrier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
ui/input-barrier.c +1 -1
@@ -455,7 +455,7 @@ static gboolean writecmd(InputBarrier *ib, struct barrierMsg *msg)break ;default :write_cmd (p, barrierCmdEUnknown, avail); -break ;; +break ; } len =MAX_HELLO_LENGTH - avail -sizeof (int );
Signature · 1 line
2.24.1
[PULL 04/17] audio/alsaaudio: Remove superfluous semicolons
In reply to Laurent VivierFrom: Philippe Mathieu-Daudé <[email protected]>
Message-Id: <[email protected]>
--- audio/alsaaudio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
audio/alsaaudio.c +2 -2
@@ -819,7 +819,7 @@ static size_t alsa_read(HWVoiceIn *hw, void *buf, size_t len)switch (nread) {case 0 :trace_alsa_read_zero (len); -return pos;; +return pos;case -EPIPE :if (alsa_recover (alsa->handle)) {
@@ -835,7 +835,7 @@ static size_t alsa_read(HWVoiceIn *hw, void *buf, size_t len)default :alsa_logerr (nread,"Failed to read %zu frames to %p\n" , len, dst); -return pos;; +return pos; } }
Signature · 1 line
2.24.1
[PULL 08/17] hw/vfio/display: Remove superfluous semicolon
In reply to Laurent VivierFrom: Philippe Mathieu-Daudé <[email protected]>
Message-Id: <[email protected]>
--- hw/vfio/display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/vfio/display.c +1 -1
@@ -287,7 +287,7 @@ static void vfio_display_dmabuf_update(void *opaque)VFIOPCIDevice *vdev = opaque;VFIODisplay *dpy = vdev->dpy;VFIODMABuf *primary, *cursor; -bool free_bufs = false, new_cursor = false;; +bool free_bufs = false, new_cursor = false; primary =vfio_display_get_dmabuf (vdev,DRM_PLANE_TYPE_PRIMARY );if (primary ==NULL ) {
Signature · 1 line
2.24.1
[PULL 05/17] hw/arm/xlnx-versal: Remove superfluous semicolon
In reply to Laurent VivierFrom: Philippe Mathieu-Daudé <[email protected]>
Message-Id: <[email protected]>
--- hw/arm/xlnx-versal-virt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/arm/xlnx-versal-virt.c +1 -1
@@ -350,7 +350,7 @@ static void create_virtio_regions(VersalVirt *s)int i;for (i =0 ; i <NUM_VIRTIO_TRANSPORT ; i++) { -char *name =g_strdup_printf ("virtio%d" , i);; +char *name =g_strdup_printf ("virtio%d" , i);hwaddr base =MM_TOP_RSVD + i * virtio_mmio_size;int irq =VERSAL_RSVD_IRQ_FIRST + i;MemoryRegion *mr;
Signature · 1 line
2.24.1
[PULL 11/17] tests/qtest/libqos/qgraph: Remove superfluous semicolons
In reply to Laurent VivierFrom: Philippe Mathieu-Daudé <[email protected]>
Message-Id: <[email protected]>
--- tests/qtest/libqos/qgraph.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tests/qtest/libqos/qgraph.c +2 -2
@@ -474,7 +474,7 @@ QOSEdgeType qos_graph_edge_get_type(QOSGraphEdge *edge)if (!edge) {return -1 ; } -return edge->type;; +return edge->type; }char *qos_graph_edge_get_dest (QOSGraphEdge *edge)
@@ -590,7 +590,7 @@ void qos_add_test(const char *name, const char *interface, QOSTestFunc test_func, QOSGraphTestOptions *opts) { QOSGraphNode *node; -char *test_name =g_strdup_printf ("%s-tests/%s" , interface, name);; +char *test_name =g_strdup_printf ("%s-tests/%s" , interface, name);QOSGraphTestOptions def_opts = { };if (!opts) {
Signature · 1 line
2.24.1
[PULL 03/17] scripts/checkpatch.pl: Detect superfluous semicolon in C code
In reply to Laurent VivierFrom: Philippe Mathieu-Daudé <[email protected]>
Display error when a commit contains superfluous semicolon:
$ git show 6663a0a3376 | scripts/checkpatch.pl -q - ERROR: superfluous trailing semicolon #276: FILE: block/io_uring.c:186: + ret = -ENOSPC;; total: 1 errors, 1 warnings, 485 lines checked
Message-Id: <[email protected]>
--- scripts/checkpatch.pl | 5 +++++ 1 file changed, 5 insertions(+)
scripts/checkpatch.pl +5 -0
@@ -1830,6 +1830,11 @@ sub process { ERROR("suspicious ; after while (0)\n" . $herecurr); } +# Check superfluous trailing ';' + if ($line =~ /;;$/) { + ERROR("superfluous trailing semicolon\n" . $herecurr); + } + # Check relative indent for conditionals and blocks. if ($line =~ /\b(?:(?:if|while|for)\s*\(|do\b)/ && $line !~ /^.\s*#/ && $line !~ /\}\s*while\s*/) { my ($s, $c) = ($stat, $cond);
Signature · 1 line
2.24.1
[PULL 16/17] hw/nios2:fix leak of fdevice tree blob
In reply to Laurent VivierFrom: Chen Qun <[email protected]>
The device tree blob returned by load_device_tree is malloced. We should free it after cpu_physical_memory_write().
Message-Id: <[email protected]>
--- hw/nios2/boot.c | 1 + 1 file changed, 1 insertion(+)
hw/nios2/boot.c +1 -0
@@ -109,6 +109,7 @@ static int nios2_load_dtb(struct nios2_boot_info bi, const uint32_t ramsize, }cpu_physical_memory_write (bi.fdt, fdt, fdt_size); +g_free (fdt);return fdt_size; }
Signature · 1 line
2.24.1
[PULL 14/17] hw/block/pflash_cfi02: Remove unneeded variable assignment
In reply to Laurent VivierFrom: Philippe Mathieu-Daudé <[email protected]>
Fix warning reported by Clang static code analyzer:
CC hw/block/pflash_cfi02.o
hw/block/pflash_cfi02.c:311:5: warning: Value stored to 'ret' is never read
ret = -1;
^ ~~Message-Id: <[email protected]>
--- hw/block/pflash_cfi02.c | 1 - 1 file changed, 1 deletion(-)
hw/block/pflash_cfi02.c +0 -1
@@ -308,7 +308,6 @@ static uint64_t pflash_read(void *opaque, hwaddr offset, unsigned int width)hwaddr boff;uint64_t ret; - ret =-1 ;/* Lazy reset to ROMD mode after a certain amount of read accesses */ if (!pfl->rom_mode && pfl->wcycle ==0 && ++pfl->read_counter >PFLASH_LAZY_ROMD_THRESHOLD ) {
Signature · 1 line
2.24.1
[PULL 17/17] hw/xtensa/xtfpga:fix leak of fdevice tree blob
In reply to Laurent VivierFrom: Chen Qun <[email protected]>
The device tree blob returned by load_device_tree is malloced. We should free it after cpu_physical_memory_write().
Message-Id: <[email protected]>
--- hw/xtensa/xtfpga.c | 1 + 1 file changed, 1 insertion(+)
hw/xtensa/xtfpga.c +1 -0
@@ -380,6 +380,7 @@ static void xtfpga_init(const XtfpgaBoardDesc *board, MachineState *machine) cur_tagptr =put_tag (cur_tagptr,BP_TAG_FDT ,sizeof (dtb_addr), &dtb_addr); cur_lowmem =QEMU_ALIGN_UP (cur_lowmem + fdt_size,4 * KiB); + g_free(fdt); }#else if (dtb_filename) {
Signature · 1 line
2.24.1
Peter Maydell
AppliedQuoted 9 lines · Laurent Vivier
The following changes since commit
6c599282f8ab382fe59f03a6cae755b89561a7b3:Merge remote-tracking branch 'remotes/armbru/tags/pull-monitor-2020-02-15-v2' into staging (2020-02-17 13:32:25 +0000)
are available in the Git repository at:
git://github.com/vivier/qemu.gittags/trivial-branch-pull-request
Quoted 9 lines
for you to fetch changes up to
d1cb67841ca213802ee789957188ec87e8b7996d:hw/xtensa/xtfpga:fix leak of fdevice tree blob (2020-02-19 10:33:38 +0100)
----------------------------------------------------------------
Fix memory leak with fdt
cosmetic change in code and logs
update mailmap
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/5.0
for any user-visible changes.
-- PMM