[PATCH v4 3/3] timer/exynos4210_mct: Remove redundant statement in exynos4210_mct_write()

2020-03-24 Thread Chen Qun
TIMER_CNT_REG_IDX(offset, lt_i); ^ ~ Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Igor Mitsyanko Cc: Peter Maydell --- hw/timer/exynos4210_mct.c | 4 1 file changed, 4 deletions(-) diff --git a/hw/timer/exynos4210_mct.c b/hw/timer/exynos4210_mct.c index 944120aea5..57

[PATCH v4 0/3] redundant code: Fix warnings reported by Clang static code analyzer

2020-03-24 Thread Chen Qun
ppe Mathieu-Daud?? review comment. - Patch13->Patch12: Add Philippe Mathieu-Daud?? review comment. v3->v4: - Deleted the patches that have been merged in the v3. - Modify "scsi/esp-pci" Patch, use g_assert with variable size. Chen Qun (3): scsi/esp-pci: Remove redundant statemen

[PATCH v4 2/3] display/blizzard: Remove redundant statement in blizzard_draw_line16_32()

2020-03-24 Thread Chen Qun
Clang static code analyzer show warning: hw/display/blizzard.c:940:9: warning: Value stored to 'data' is never read data >>= 5; ^~ Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Andrzej Zaborowski Cc: Peter Maydell --- hw/display/blizzard

[PATCH v4 1/3] scsi/esp-pci: Remove redundant statement in esp_pci_io_write()

2020-03-24 Thread Chen Qun
Clang static code analyzer show warning: hw/scsi/esp-pci.c:198:9: warning: Value stored to 'size' is never read size = 4; ^ ~ Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Paolo Bonzini Cc:Fam Zheng v1->v2: keep ' size = 4' and

[PATCH v5 1/3] scsi/esp-pci: add g_assert() for fix clang analyzer warning in esp_pci_io_write()

2020-03-24 Thread Chen Qun
Clang static code analyzer show warning: hw/scsi/esp-pci.c:198:9: warning: Value stored to 'size' is never read size = 4; ^ ~ Reported-by: Euler Robot Signed-off-by: Chen Qun Reviewed-by: Laurent Vivier --- Cc: Paolo Bonzini Cc:Fam Zheng v1->v2: keep &#x

[PATCH v5 3/3] timer/exynos4210_mct: Remove redundant statement in exynos4210_mct_write()

2020-03-24 Thread Chen Qun
TIMER_CNT_REG_IDX(offset, lt_i); ^ ~ Reported-by: Euler Robot Signed-off-by: Chen Qun Reviewed-by: Laurent Vivier --- Cc: Igor Mitsyanko Cc: Peter Maydell --- hw/timer/exynos4210_mct.c | 4 1 file changed, 4 deletions(-) diff --git a/hw/timer/exynos4210_mct.c b/hw/timer/exy

[PATCH v5 0/3] redundant code: Fix warnings reported by Clang static code analyzer

2020-03-24 Thread Chen Qun
change the subject. - Patch2: Use extract16() instead of delete bit operation statement. - Patch3: Add Laurent Vivier review comment. Chen Qun (3): scsi/esp-pci: add g_assert() for fix clang analyzer warning in esp_pci_io_write() display/blizzard: use extract16() for fix clang analyzer

[PATCH v5 2/3] display/blizzard: use extract16() for fix clang analyzer warning in blizzard_draw_line16_32()

2020-03-24 Thread Chen Qun
Clang static code analyzer show warning: hw/display/blizzard.c:940:9: warning: Value stored to 'data' is never read data >>= 5; ^~ Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Andrzej Zaborowski Cc: Peter Maydell v1->v2: Use extract16

[PATCH 3/3] crypto: Redundant type conversion for AES_KEY pointer

2020-03-25 Thread Chen Qun
Fix: eaec903c5b8 Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: "Daniel P. Berrangé" --- crypto/cipher-builtin.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/crypto/cipher-builtin.c b/crypto/cipher-builtin.c index bf8413e71a..99d6280a16 10

[PATCH 0/3] Three trivial patchs

2020-03-25 Thread Chen Qun
Patch1: For g_autofree type initialized. Patch2: Juest 80-char limit for virtio-crypto. Patch3: Redundant type conversion for crypto. Chen Qun (3): gdbstub: prevent uninitialized warning virtio-crypto: fix 80-char limit violations in virtio_crypto_device_realize() crypto: Redundant type

[PATCH 1/3] gdbstub: prevent uninitialized warning

2020-03-25 Thread Chen Qun
function [-Wmaybe-uninitialized] g_free (*pp); ^~~~ Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: "Alex Bennée" Cc: "Philippe Mathieu-Daudé" --- gdbstub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gdbstub.c b/gdbstu

[PATCH 2/3] virtio-crypto: fix 80-char limit violations in virtio_crypto_device_realize()

2020-03-25 Thread Chen Qun
Fix: aa8f057e74ae Reported-by: Euler Robot Signed-off-by: Chen Qun --- hw/virtio/virtio-crypto.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/virtio/virtio-crypto.c b/hw/virtio/virtio-crypto.c index 4c65114de5..eb4a9e4e85 100644 --- a/hw/virtio/virtio-crypto.c +++ b

[PATCH v3 11/12] usb/hcd-ehci: Remove redundant statements

2020-03-02 Thread Chen Qun
again = -1; ^ ~~ Reported-by: Euler Robot Signed-off-by: Chen Qun Reviewed-by: Philippe Mathieu-Daudé --- Cc: Gerd Hoffmann Cc: Philippe Mathieu-Daudé --- hw/usb/hcd-ehci.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c index 56

[PATCH v3 00/12] redundant code: Fix warnings reported by Clang static code analyzer

2020-03-02 Thread Chen Qun
ippe Mathieu-Daudé review comment. - Patch13->Patch12: Add Philippe Mathieu-Daudé review comment. Chen Qun (12): block/stream: Remove redundant statement in stream_run() block/iscsi:Remove redundant statement in iscsi_open() block/file-posix: Remove redundant statement in raw_handle_perm_lock(

[PATCH v3 05/12] scsi/scsi-disk: Remove redundant statement in scsi_disk_emulate_command()

2020-03-02 Thread Chen Qun
Clang static code analyzer show warning: scsi/scsi-disk.c:1918:5: warning: Value stored to 'buflen' is never read buflen = req->cmd.xfer; ^~ Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Paolo Bonzini Cc: Fam Zheng --- hw/scsi/scsi-disk.c

[PATCH v3 03/12] block/file-posix: Remove redundant statement in raw_handle_perm_lock()

2020-03-02 Thread Chen Qun
Clang static code analyzer show warning: block/file-posix.c:891:9: warning: Value stored to 'op' is never read op = RAW_PL_ABORT; ^ Reported-by: Euler Robot Signed-off-by: Chen Qun Reviewed-by: Kevin Wolf --- Cc: Kevin Wolf Cc: Max Reitz ---

[PATCH v3 02/12] block/iscsi:Remove redundant statement in iscsi_open()

2020-03-02 Thread Chen Qun
Clang static code analyzer show warning: block/iscsi.c:1920:9: warning: Value stored to 'flags' is never read flags &= ~BDRV_O_RDWR; ^ Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Ronnie Sahlberg Cc: Paolo Bonzini Cc: Peter Lie

[PATCH v3 01/12] block/stream: Remove redundant statement in stream_run()

2020-03-02 Thread Chen Qun
Clang static code analyzer show warning: block/stream.c:186:9: warning: Value stored to 'ret' is never read ret = 0; ^ ~ Reported-by: Euler Robot Signed-off-by: Chen Qun Reviewed-by: John Snow Reviewed-by: Kevin Wolf --- Cc: John Snow Cc: Kevin Wolf Cc: Max

[PATCH v3 10/12] timer/exynos4210_mct: Remove redundant statement in exynos4210_mct_write()

2020-03-02 Thread Chen Qun
TIMER_CNT_REG_IDX(offset, lt_i); ^ ~ Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Igor Mitsyanko Cc: Peter Maydell --- hw/timer/exynos4210_mct.c | 4 1 file changed, 4 deletions(-) diff --git a/hw/timer/exynos4210_mct.c b/hw/timer/exynos4210_mct.c index 944120aea5..57

[PATCH v3 04/12] scsi/esp-pci: Remove redundant statement in esp_pci_io_write()

2020-03-02 Thread Chen Qun
Clang static code analyzer show warning: hw/scsi/esp-pci.c:198:9: warning: Value stored to 'size' is never read size = 4; ^ ~ Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Paolo Bonzini Cc:Fam Zheng --- hw/scsi/esp-pci.c | 1 - 1 file changed,

[PATCH v3 08/12] display/blizzard: Remove redundant statement in blizzard_draw_line16_32()

2020-03-02 Thread Chen Qun
Clang static code analyzer show warning: hw/display/blizzard.c:940:9: warning: Value stored to 'data' is never read data >>= 5; ^~ Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Andrzej Zaborowski Cc: Peter Maydell --- hw/display/blizzard

[PATCH v3 06/12] display/pxa2xx_lcd: Remove redundant statement in pxa2xx_palette_parse()

2020-03-02 Thread Chen Qun
Clang static code analyzer show warning: hw/display/pxa2xx_lcd.c:596:9: warning: Value stored to 'format' is never read format = 0; ^~ Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Andrzej Zaborowski Cc: Peter Maydell --- hw/display/pxa2xx_lcd.

[PATCH v3 00/12] redundant code: Fix warnings reported by Clang static code analyzer

2020-03-02 Thread Chen Qun
ippe Mathieu-Daudé review comment. - Patch13->Patch12: Add Philippe Mathieu-Daudé review comment. Chen Qun (12): block/stream: Remove redundant statement in stream_run() block/iscsi:Remove redundant statement in iscsi_open() block/file-posix: Remove redundant statement in raw_handle_perm_lock(

[PATCH v3 07/12] display/exynos4210_fimd: Remove redundant statement in exynos4210_fimd_update()

2020-03-02 Thread Chen Qun
Clang static code analyzer show warning: hw/display/exynos4210_fimd.c:1313:17: warning: Value stored to 'is_dirty' is never read is_dirty = false; Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Igor Mitsyanko Cc: Peter Maydell --- hw/display/exynos4210_

[PATCH v3 09/12] dma/xlnx-zdma: Remove redundant statement in zdma_write_dst()

2020-03-02 Thread Chen Qun
ted-by: Euler Robot Signed-off-by: Chen Qun Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Francisco Iglesias Reviewed-by: Alistair Francis --- Cc: Alistair Francis Cc: "Edgar E. Iglesias" Cc: Peter Maydell Cc: Philippe Mathieu-Daudé v1->v2: move the 'dst_type' declar

[PATCH v3 12/12] monitor/hmp-cmds: Remove redundant statement in hmp_rocker_of_dpa_groups()

2020-03-02 Thread Chen Qun
Clang static code analyzer show warning: monitor/hmp-cmds.c:2867:17: warning: Value stored to 'set' is never read set = true; ^ Reported-by: Euler Robot Signed-off-by: Chen Qun Reviewed-by: Philippe Mathieu-Daudé --- Cc: "Dr. David Al

[PATCH v2] hw/net/imx_fec: write TGSR and TCSR3 in imx_enet_write()

2020-03-05 Thread Chen Qun
never read value = value & 0x00fd; ^ ~~ According to the definition of the function, the two “value” assignments should be written to registers. Reported-by: Euler Robot Signed-off-by: Chen Qun --- v1->v2: The register 'ENET_TGSR' wr

[PATCH] hw/scsi/megasas:Clean up some redundant code fix Clang warnings

2020-03-10 Thread Chen Qun
s->fw_luns; ^~~~ ~~ hw/scsi/megasas.c:1183:9: warning: Value stored to 'max_ld_disks' is never read max_ld_disks = 0; ^ ~ Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Paolo Bonzini Cc: Fam Zheng Cc: Hannes Reinecke Cc: qemu-b

[PATCH v3] block/iscsi:use the flags in iscsi_open() prevent Clang warning

2020-03-10 Thread Chen Qun
s. We can use the flags instead bs->open_flags to prevent Clang warning. Reported-by: Euler Robot Signed-off-by: Chen Qun Reviewed-by: Kevin Wolf --- Cc: Ronnie Sahlberg Cc: Paolo Bonzini Cc: Peter Lieven Cc: Kevin Wolf Cc: Max Reitz Cc: Laurent Vivier v1->v2: Keep the 'flags&

[PATCH v3] hw/net/imx_fec: write TGSR and TCSR3 in imx_enet_write()

2020-03-12 Thread Chen Qun
never read value = value & 0x00fd; ^ ~~ According to the definition of the function, the two “value” assignments should be written to registers. Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Peter Maydell Cc: Jason Wang Cc: Peter Ch

[PATCH v4] hw/net/imx_fec: write TGSR and TCSR3 in imx_enet_write()

2020-03-13 Thread Chen Qun
never read value = value & 0x00fd; ^ ~~ According to the definition of the function, the two “value” assignments should be written to registers. Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Peter Maydell Cc: Jason Wang Cc: Peter Ch

[PATCH 02/11] hw/arm/omap1:Remove redundant statement in omap_clkdsp_read()

2020-08-13 Thread Chen Qun
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 Signed-off-by: Chen Qun --- Cc: Peter Mayd

[PATCH 07/11] vfio/platform: Remove dead assignment in vfio_intp_interrupt()

2020-08-13 Thread Chen Qun
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 Signed-off-by: Che

[PATCH 04/11] target/arm/translate-a64:Remove redundant statement in disas_simd_two_reg_misc_fp16()

2020-08-13 Thread Chen Qun
extract32(insn, 5, 5); ^~ Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Peter Maydell Cc: qemu-...@nongnu.org --- 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 c8

[PATCH 05/11] hw/virtio/vhost-user:Remove dead assignment in scrub_shadow_regions()

2020-08-13 Thread Chen Qun
Robot Signed-off-by: Chen Qun --- Cc: "Michael S. Tsirkin" Cc: Raphael Norwitz --- 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 d7e2423762..9c5b4f7fbc 100644 --- a/hw/virtio/vhost-user

[PATCH 06/11] hw/net/virtio-net:Remove redundant statement in virtio_net_rsc_tcp_ctrl_check()

2020-08-13 Thread Chen Qun
tement is the same as that of the first two statements. Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: "Michael S. Tsirkin" Cc: Jason Wang --- 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 a1fe9e9285.

[PATCH 00/11] trivial patchs for static code analyzer fixes

2020-08-13 Thread Chen Qun
Hi All, This series fix trivial warnings reported by the Clang static code analyzer. Chen Qun (11): 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

[PATCH 08/11] tcg/optimize: Remove redundant statement in tcg_optimize()

2020-08-13 Thread Chen Qun
Clang static code analyzer show warning: tcg/optimize.c:1267:17: warning: Value stored to 'nb_iargs' is never read nb_iargs = 2; ^ ~ Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Richard Henderson Cc: Richard Henderson --- tcg/

[PATCH 03/11] target/arm/translate-a64:Remove dead assignment in handle_scalar_simd_shli()

2020-08-13 Thread Chen Qun
to 'tcg_rd' during its initialization is never read TCGv_i64 tcg_rd = new_tmp_a64(s); ^~ ~~ There is a memory leak for the variable new_tmp_a64 "s". We should delete the assignment. Reported-by: Euler Robot Signed-off-by: Chen Qun -

[PATCH 10/11] hw/intc: Remove redundant statement in exynos4210_combiner_read()

2020-08-13 Thread Chen Qun
n 'val'. Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Igor Mitsyanko Cc: Peter Maydell --- hw/intc/exynos4210_combiner.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/intc/exynos4210_combiner.c b/hw/intc/exynos4210_combiner.c index b8561e4180..e2e

[PATCH 01/11] hw/arm/virt-acpi-build:Remove dead assignment in build_madt()

2020-08-13 Thread Chen Qun
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 Signed-off-by: Chen Qun --- Cc: Sh

[PATCH 09/11] usb/bus: Remove dead assignment in usb_get_fw_dev_path()

2020-08-13 Thread Chen Qun
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 Signed-off-by: Chen Qun --- Cc: Gerd Hoffmann Cc: Markus Armbruster -

[PATCH 11/11] hw/display/vga:Remove redundant statement in vga_draw_graphic()

2020-08-13 Thread Chen Qun
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 Signed-off-by: Chen Qun --- Cc: Gerd Hoffmann --- hw/display/vga.c | 1 - 1 file

[PATCH] qtest: delete redundant qtest.h header files

2021-02-24 Thread Chen Qun
There are 23 files that include the "sysemu/qtest.h", but they do not use any qtest functions. Signed-off-by: Chen Qun --- accel/tcg/cpu-exec.c| 1 - blockdev.c | 1 - hw/9pfs/9p.c| 1 - hw/arm/armv7m.c | 1

[PATCH v2] qtest: delete superfluous inclusions of qtest.h

2021-02-26 Thread Chen Qun
There are 23 files that include the "sysemu/qtest.h", but they do not use any qtest functions. Signed-off-by: Chen Qun --- v1->v2: Change the subject base on Markus's suggestion. Cc: Markus Armbruster --- accel/tcg/cpu-exec.c| 1 - blockdev.c

[PATCH] migration/block-dirty-bitmap: fix uninitialized variable warning

2020-10-10 Thread Chen Qun
p_name)); ^~ Reported-by: Euler Robot Signed-off-by: Chen Qun --- migration/block-dirty-bitmap.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/migration/block-dirty-bitmap.c b/migration/block-dirty-bitmap.c index 5bef793ac0..e09ea4f22b

[PATCH v2] migration/block-dirty-bitmap: fix uninitialized variable warning

2020-10-13 Thread Chen Qun
_name, sizeof(s->bitmap_name)); ^~ Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Vladimir Sementsov-Ogievskiy Cc: Laurent Vivier Cc: Li Qiang --- migration/block-dirty-bitmap.c | 9 ++--- 1 file changed, 2

[PATCH v3] migration/block-dirty-bitmap: fix uninitialized variable warning

2020-10-14 Thread Chen Qun
_name, sizeof(s->bitmap_name)); ^~ Reported-by: Euler Robot Signed-off-by: Chen Qun --- v2->v3: Placing the declaration at the beginning of the block(Base on Max's suggestion). Cc: Max Reitz Cc: Vladimir Sementso

[PATCH] tests/migration: fix memleak in wait_command/wait_command_fd

2020-10-21 Thread Chen Qun
-helpers.c:148 #14 0x557bf3c43b8f in test_migrate_auto_converge ../tests/qtest/migration-test.c:1243 .. SUMMARY: AddressSanitizer: 11670244 byte(s) leaked in 8422 allocation(s). Reported-by: Euler Robot Signed-off-by: Chen Qun --- tests/qtest/migration-helpers.c | 16 1

[PATCH RESEND v2 3/7] elf2dmp/qemu_elf: Plug memleak in QEMU_Elf_init

2020-10-22 Thread Chen Qun
From: Pan Nengyuan Missing g_error_free in QEMU_Elf_init() error path. Fix that. Reported-by: Euler Robot Signed-off-by: Pan Nengyuan Reviewed-by: Viktor Prutyanov Reviewed-by: Li Qiang Signed-off-by: Chen Qun --- contrib/elf2dmp/qemu_elf.c | 1 + 1 file changed, 1 insertion(+) diff

[PATCH RESEND v2 4/7] elf2dmp/pdb: Plug memleak in pdb_init_from_file

2020-10-22 Thread Chen Qun
From: Pan Nengyuan Missing g_error_free in pdb_init_from_file() error path. Fix that. Reported-by: Euler Robot Signed-off-by: Pan Nengyuan Reviewed-by: Viktor Prutyanov Reviewed-by: Li Qiang Signed-off-by: Chen Qun --- contrib/elf2dmp/pdb.c | 1 + 1 file changed, 1 insertion(+) diff

[PATCH RESEND v2 0/7] some memleak trivial patchs

2020-10-22 Thread Chen Qun
Hi all, Here are some memory leak patches reported by EulerRobot. Some patch submissions have been unattended for a while and I resend them. Thanks, Chen Qun Chen Qun (1): tests/migration: fix memleak in wait_command/wait_command_fd Pan Nengyuan (6): qga/channel-posix: Plug memory leak

[PATCH RESEND v2 7/7] block/file-posix: fix a possible undefined behavior

2020-10-22 Thread Chen Qun
Wolf Reviewed-by: Li Qiang Signed-off-by: Chen Qun --- block/file-posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/file-posix.c b/block/file-posix.c index c63926d592..b711124672 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -2110,7 +2110,7 @@ static

[PATCH RESEND v2 6/7] blockdev: Fix a memleak in drive_backup_prepare()

2020-10-22 Thread Chen Qun
From: Pan Nengyuan 'local_err' seems forgot to propagate in error path, it'll cause a memleak. Fix it. Reported-by: Euler Robot Signed-off-by: Pan Nengyuan Reviewed-by: Kevin Wolf Reviewed-by: Li Qiang Signed-off-by: Chen Qun --- blockdev.c | 1 + 1 file changed, 1 ins

[PATCH RESEND v2 1/7] tests/migration: fix memleak in wait_command/wait_command_fd

2020-10-22 Thread Chen Qun
-helpers.c:148 #14 0x557bf3c43b8f in test_migrate_auto_converge ../tests/qtest/migration-test.c:1243 .. Fix: 5e34005571af5 Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Thomas Huth Cc: Laurent Vivier Cc: Maxim Levitsky Cc: Paolo Bonzini --- tests/qtest/migration-helpers.c

[PATCH RESEND v2 5/7] migration/colo: Plug memleaks in colo_process_incoming_thread

2020-10-22 Thread Chen Qun
From: Pan Nengyuan 'local_err' forgot to free in colo_process_incoming_thread error path. Fix that. Reported-by: Euler Robot Signed-off-by: Pan Nengyuan Reviewed-by: Li Qiang Signed-off-by: Chen Qun --- Cc: Hailiang Zhang Cc: Juan Quintela Cc: "Dr. David Alan Gilbert&q

[PATCH RESEND v2 2/7] qga/channel-posix: Plug memory leak in ga_channel_write_all()

2020-10-22 Thread Chen Qun
From: Pan Nengyuan Missing g_error_free on error path in ga_channel_write_all(). Fix that. Reported-by: Euler Robot Signed-off-by: Pan Nengyuan Reviewed-by: Li Qiang Signed-off-by: Chen Qun --- Cc: Michael Roth --- qga/channel-posix.c | 6 +- 1 file changed, 5 insertions(+), 1

[PATCH] target/ppc/excp_helper: Add a missing break for POWERPC_EXCP_HISI

2020-10-27 Thread Chen Qun
ode; | ^~ ../target/ppc/excp_helper.c:530:5: note: here 530 | case POWERPC_EXCP_HDECR: /* Hypervisor decrementer exception */ | ^~~~ A break statement may be required to enter this exception. Reported-by: Euler Robot Signed-off-by: Chen Qun --- I gu

[PATCH 0/9] silence the compiler warnings

2020-10-27 Thread Chen Qun
Hi all, When building with GCC9 using CFLAG -Wimplicit-fallthrough=2 we get a lot of warning. Some problems may be missing break statements which I have submitted the patch separately. This series is all add the corresponding "fall through" comment to fix them. Chen Qun (9): t

[PATCH 1/9] target/i386: silence the compiler warnings in gen_shiftd_rm_T1

2020-10-27 Thread Chen Qun
s statement may fall through [-Wimplicit-fallthrough=] if (is_right) { ^ target/i386/translate.c:1782:5: note: here case MO_32: ^~~~ Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost --- target/i386/

[PATCH 2/9] hw/intc/arm_gicv3_kvm: silence the compiler warnings

2020-10-27 Thread Chen Qun
][1] = reg64; ~~^~~ hw/intc/arm_gicv3_kvm.c:652:9: note: here default: ^~~ Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Peter Maydell Cc: qemu-...@nongnu.org --- hw/intc/arm_gicv3_kvm.c | 8 1 file changed, 8 insertions(+) diff --g

[PATCH 5/9] target/sparc/translate: silence the compiler warnings

2020-10-27 Thread Chen Qun
ATURE_HYPV)) { |^ target/sparc/translate.c:2329:5: note: here 2329 | case GET_ASI_DIRECT: | ^~~~ The "fall through" statement place is not correctly identified by the compiler. Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Mark Cave-Ayland

[PATCH 6/9] target/sparc/win_helper: silence the compiler warnings

2020-10-27 Thread Chen Qun
); | ^~ target/sparc/win_helper.c:306:5: note: here 306 | case 0: | ^~~~ Add the corresponding "fall through" comment to fix it. Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Mark Cave-Ayland Cc: Artyom Tarasenko -

[PATCH 3/9] accel/tcg/user-exec: silence the compiler warnings

2020-10-27 Thread Chen Qun
ot; instead of "NORETURN" here. Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Riku Voipio Cc: Richard Henderson Cc: Paolo Bonzini --- accel/tcg/user-exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c index 4

[PATCH 9/9] hw/timer/renesas_tmr: silence the compiler warnings

2020-10-27 Thread Chen Qun
| ^ ../hw/timer/renesas_tmr.c:224:5: note: here 224 | case A_TCORB: | ^~~~ Add the corresponding "fall through" comment to fix it. Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Yoshinori Sato Cc: Magnus Damm --- hw/timer/renesas_tmr.c | 1 + 1 file changed, 1

[PATCH 4/9] linux-user/mips/cpu_loop: silence the compiler warnings

2020-10-27 Thread Chen Qun
ned-off-by: Chen Qun --- Cc: Laurent Vivier --- linux-user/mips/cpu_loop.c | 4 1 file changed, 4 insertions(+) diff --git a/linux-user/mips/cpu_loop.c b/linux-user/mips/cpu_loop.c index 553e8ca7f5..cfe7ba5c47 100644 --- a/linux-user/mips/cpu_loop.c +++ b/linux-user/mips/cpu_loop.c @@ -104,

[PATCH 8/9] target/ppc: silence the compiler warnings

2020-10-27 Thread Chen Qun
))) { |^ target/ppc/mmu_helper.c:1358:5: note: here 1358 | default: | ^~~ Add the corresponding "fall through" comment to fix it. Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: David Gibson --- target/ppc/mmu_helper.c | 1 + 1 file changed, 1 insertion(+)

[PATCH 7/9] ppc: silence the compiler warnings

2020-10-27 Thread Chen Qun
: here 123 | case PPC6xx_INPUT_INT: | ^~~~ Add the corresponding "fall through" comment to fix it. Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: David Gibson --- hw/ppc/ppc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/ppc/ppc.c b/hw/ppc/p

[PATCH] target/ppc/excp_helper: Add a fallthrough for fix compiler warning

2020-10-27 Thread Chen Qun
ode; | ^~ ../target/ppc/excp_helper.c:530:5: note: here 530 | case POWERPC_EXCP_HDECR: /* Hypervisor decrementer exception */ | ^~~~ Add the corresponding "fall through" comment to fix it. Reported-by: Euler Robot Signed-off-by: Chen Qun --

[PATCH] block/iscsi:fix heap-buffer-overflow in iscsi_aio_ioctl_cb

2020-04-17 Thread Chen Qun
-softmmu/qemu-system-aarch64+0x2c00740) Reported-by: Euler Robot Signed-off-by: Chen Qun Reviewed-by: Stefan Hajnoczi --- v1->v2: Use MIN() macro for mx_sb_len and sb_len_wr. (Base comments from Michael S. Tsirkin, Stefan Hajnoczi, Kevin Wolf) Cc: Stefan Hajnoczi Cc: Kevin Wolf Cc: Michael S

[PATCH v2] crypto: Redundant type conversion for AES_KEY pointer

2020-05-05 Thread Chen Qun
We can delete the redundant type conversion if we set the the AES_KEY parameter with 'const' in qcrypto_cipher_aes_ecb_(en|de)crypt() function. Reported-by: Euler Robot Signed-off-by: Chen Qun --- v1->v2: Cc: "Daniel P. Berrangé" Modify the AES_KEY pa

[PATCH] hw/net/imx_fec: write TGSR and TCSR3 in imx_enet_write()

2020-02-24 Thread Chen Qun
never read value = value & 0x00fd; ^ ~~ According to the definition of the function, the two “value” assignments should be written to registers. Reported-by: Euler Robot Signed-off-by: Chen Qun --- I'm not sure if this modification is correct, j

[PATCH v2 0/8] silence the compiler warnings

2020-10-29 Thread Chen Qun
ll through */ comments. - Patch8: Replace the TODO by a LOG_UNIMP call and add break statement - Patch9: Discard this patch since a patch already exists for fix this issue(https://lore.kernel.org/qemu-devel/20200711154242.41222-1-ysato@users) Chen Qun (8): target/i386: silence the compiler w

[PATCH v2 4/8] linux-user/mips/cpu_loop: silence the compiler warnings

2020-10-29 Thread Chen Qun
ned-off-by: Chen Qun Reviewed-by: Thomas Huth --- Cc: Laurent Vivier --- linux-user/mips/cpu_loop.c | 4 1 file changed, 4 insertions(+) diff --git a/linux-user/mips/cpu_loop.c b/linux-user/mips/cpu_loop.c index 553e8ca7f5..cfe7ba5c47 100644 --- a/linux-user/mips/cpu_loop.c +++ b/linux

[PATCH v2 5/8] target/sparc/translate: silence the compiler warnings

2020-10-29 Thread Chen Qun
ATURE_HYPV)) { |^ target/sparc/translate.c:2329:5: note: here 2329 | case GET_ASI_DIRECT: | ^~~~ The "fall through" statement place is not correctly identified by the compiler. Reported-by: Euler Robot Signed-off-by: Chen Qun Reviewed-by: Artyom Tarasenko R

[PATCH v2 8/8] target/ppc: replaced the TODO with LOG_UNIMP and add break for silence warnings

2020-10-29 Thread Chen Qun
))) { |^ target/ppc/mmu_helper.c:1358:5: note: here 1358 | default: | ^~~ Use "qemu_log_mask(LOG_UNIMP**)" instead of the TODO comment. And add the break statement to fix it. Reported-by: Euler Robot Signed-off-by: Chen Qun --- v1->v2: replace the TODO by a LOG_U

[PATCH v2 6/8] target/sparc/win_helper: silence the compiler warnings

2020-10-29 Thread Chen Qun
); | ^~ target/sparc/win_helper.c:306:5: note: here 306 | case 0: | ^~~~ Add the corresponding "fall through" comment to fix it. Reported-by: Euler Robot Signed-off-by: Chen Qun Reviewed-by: Artyom Tarasenko --- v1->v2: Combin

[PATCH v2 3/8] accel/tcg/user-exec: silence the compiler warnings

2020-10-29 Thread Chen Qun
); | ^ ../accel/tcg/user-exec.c:172:9: note: here 172 | default: Mark the cpu_exit_tb_from_sighandler() function with QEMU_NORETURN to fix it. Reported-by: Euler Robot Signed-off-by: Chen Qun --- v1->v2: Add QEMU_NORETURN

[PATCH v2 1/8] target/i386: silence the compiler warnings in gen_shiftd_rm_T1

2020-10-29 Thread Chen Qun
s statement may fall through [-Wimplicit-fallthrough=] if (is_right) { ^ target/i386/translate.c:1782:5: note: here case MO_32: ^~~~ Reported-by: Euler Robot Signed-off-by: Chen Qun Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth --- v1->v2: Add comments

[PATCH v2 7/8] ppc: Add a missing break for PPC6xx_INPUT_TBEN

2020-10-29 Thread Chen Qun
: here 123 | case PPC6xx_INPUT_INT: | ^~~~ According to the discussion, a break statement needs to be added here. Reported-by: Euler Robot Signed-off-by: Chen Qun --- v1->v2: Add a "break" statement here instead of /* fall through */ comments (Base on Thomas'

[PATCH v2 2/8] hw/intc/arm_gicv3_kvm: silence the compiler warnings

2020-10-29 Thread Chen Qun
][1] = reg64; ~~^~~ hw/intc/arm_gicv3_kvm.c:652:9: note: here default: ^~~ Reported-by: Euler Robot Signed-off-by: Chen Qun Reviewed-by: Peter Maydell --- Cc: Peter Maydell Cc: qemu-...@nongnu.org --- hw/intc/arm_gicv3_kvm.c | 8 1 fil

[PATCH 2/6] hw/rdma/rdma_backend: fix uninitialized variable warning in rdma_poll_cq()

2020-11-02 Thread Chen Qun
93 | int i, ne, total_ne = 0; |^~ Add a default value for 'ne' to prevented the warning. Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Yuval Shaia Cc: Marcel Apfelbaum --- hw/rdma/rdma_backend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 5/6] plugins/loader: fix uninitialized variable warning in plugin_reset_uninstall()

2020-11-02 Thread Chen Qun
Signed-off-by: Chen Qun --- Cc: "Alex Bennée" --- plugins/loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/loader.c b/plugins/loader.c index 8ac5dbc20f..88593fe138 100644 --- a/plugins/loader.c +++ b/plugins/loader.c @@ -367,7 +367,7 @@ void

[PATCH 4/6] util/qemu-timer: fix uninitialized variable warning for expire_time

2020-11-02 Thread Chen Qun
;clock->type); | ~~^~ Add a default value for 'expire_time' to prevented the warning. Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Paolo Bonzini --- util/qemu-timer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/qemu-timer.c

[PATCH 1/6] target/xtensa: fix uninitialized variable warning

2020-11-02 Thread Chen Qun
m_bits(isa, rf); | ^~~~ Add a default value for 'rf' to prevented the warning. Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Max Filippov --- target/xtensa/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/xtensa/translate.c b/target

[PATCH 3/6] util/qemu-timer: fix uninitialized variable warning in timer_mod_anticipate_ns()

2020-11-02 Thread Chen Qun
function ‘timer_mod_anticipate_ns’: util/qemu-timer.c:474:8: warning: ‘rearm’ may be used uninitialized in this function [-Wmaybe-uninitialized] 474 | if (rearm) { |^ Change the default value assignment place to prevented the warning. Reported-by: Euler Robot Signed-off-by: Chen

[PATCH 0/6] fix uninitialized variable warning

2020-11-02 Thread Chen Qun
Hi all, There are some variables initialized warnings reported by the compiler, even if the default CFLAG for the compiler parameters are uesed. This serial has added some default values or changed the assignment places for the variablies to fix them. Thanks, Chen Qun Chen Qun (6): target

[PATCH 6/6] migration: fix uninitialized variable warning in migrate_send_rp_req_pages()

2020-11-02 Thread Chen Qun
ned-off-by: Chen Qun --- Cc: Juan Quintela Cc: "Dr. David Alan Gilbert" --- migration/migration.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/migration.c b/migration/migration.c index 9bb4fee5ac..de90486a61 100644 --- a/migration/migration.c +++ b/m

[PATCH] hw/intc: fix heap-buffer-overflow in rxicu_realize()

2020-11-04 Thread Chen Qun
:49 #16 0x7feefafa5d42 in __libc_start_main (/lib64/libc.so.6+0x26d42) Change the 'j < icu->nr_sense' condition place to fix it. Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Yoshinori Sato --- hw/intc/rx_icu.c | 6 ++ 1 file changed, 2 insertions(+),

[PATCH-for-5.2 v2] hw/intc: fix heap-buffer-overflow in rxicu_realize()

2020-11-11 Thread Chen Qun
(/lib64/libc.so.6+0x26d42) Add the 'ice->src[i].sense' initialize to the default value, and then process init_sense array to identify which irqs should be level-triggered. Suggested-by: Peter Maydell Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Yoshinori Sato v1->v2:

[PATCH v2 0/5] fix uninitialized variable warning

2020-11-11 Thread Chen Qun
um and Yuval Shaia review comment. --patch3->patch2: Add Philippe Mathieu-Daudé review comment. --patch6->patch5: Add Philippe Mathieu-Daudé review comment. Chen Qun (5): hw/rdma/rdma_backend: fix uninitialized variable warning in rdma_poll_cq() util/qemu-timer: fix uninitiali

[PATCH v2 3/5] util/qemu-timer: fix uninitialized variable warning for expire_time

2020-11-11 Thread Chen Qun
st->clock->type); | ~~^~ Add a default value for 'expire_time' to prevented the warning. Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Paolo Bonzini --- util/qemu-timer.c | 4 ++-- 1 file ch

[PATCH v2 4/5] plugins/loader: fix uninitialized variable warning in plugin_reset_uninstall()

2020-11-11 Thread Chen Qun
time' to prevented the warning. Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: "Alex Bennée" --- plugins/loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/loader.c b/plugins/loader.c index 8ac5dbc20f..88593fe138 100644 --- a/plugins

[PATCH v2 5/5] migration: fix uninitialized variable warning in migrate_send_rp_req_pages()

2020-11-11 Thread Chen Qun
d' to prevented the warning. Reported-by: Euler Robot Signed-off-by: Chen Qun Reviewed-by: Philippe Mathieu-Daudé --- Cc: Juan Quintela Cc: "Dr. David Alan Gilbert" --- migration/migration.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/mig

[PATCH v2 1/5] hw/rdma/rdma_backend: fix uninitialized variable warning in rdma_poll_cq()

2020-11-11 Thread Chen Qun
^~~~ hw/rdma/rdma_backend.c:93:12: note: ‘ne’ was declared here 93 | int i, ne, total_ne = 0; |^~ Add a default value for 'ne' to prevented the warning. Reported-by: Euler Robot Signed-off-by: Chen Qun Reviewed-by: Marcel Apfelbaum Reviewed-by: Yuval Shaia --- Cc: Yuv

[PATCH v2 2/5] util/qemu-timer: fix uninitialized variable warning in timer_mod_anticipate_ns()

2020-11-11 Thread Chen Qun
prevented the warning. Reported-by: Euler Robot Signed-off-by: Chen Qun Reviewed-by: Philippe Mathieu-Daudé --- Cc: Paolo Bonzini --- util/qemu-timer.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/util/qemu-timer.c b/util/qemu-timer.c index 81c28af517..8b73882fbb 100644 --- a

[PATCH v3 5/7] target/sparc/win_helper: silence the compiler warnings

2020-11-15 Thread Chen Qun
); | ^~ target/sparc/win_helper.c:306:5: note: here 306 | case 0: | ^~~~ Add the corresponding "fall through" comment to fix it. Reported-by: Euler Robot Signed-off-by: Chen Qun Reviewed-by: Artyom Tarasenko Reviewed-b

[PATCH v3 1/7] target/i386: silence the compiler warnings in gen_shiftd_rm_T1

2020-11-15 Thread Chen Qun
: warning: this statement may fall through [-Wimplicit-fallthrough=] if (is_right) { ^ target/i386/translate.c:1782:5: note: here case MO_32: ^~~~ Reported-by: Euler Robot Signed-off-by: Chen Qun Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth --- v1->v

[PATCH v3 4/7] target/sparc/translate: silence the compiler warnings

2020-11-15 Thread Chen Qun
atures & CPU_FEATURE_HYPV)) { |^ target/sparc/translate.c:2329:5: note: here 2329 | case GET_ASI_DIRECT: | ^~~~ The "fall through" statement place is not correctly identified by the compiler. Reported-by: Euler Robot Signed-off-by: Chen Qun Reviewed-by: Artyom Ta

[PATCH v3 0/7] silence the compiler warnings

2020-11-15 Thread Chen Qun
ave a negative impact for QEMU 5.2. Thanks, Chen Qun Since v2: - Patch3:Add Richard Henderson、Philippe Mathieu-Daudé and Thomas Huth reviewed tag. - Patch4: Laurent pull it to master, remove it. - Patch6->Patch5: Add Richard Henderson and Philippe Mathieu-Daudé reviewed tag. - Patch7->Patch

  1   2   >