trivial: Detect and remove superfluous semicolons in C code
Subsystems (2)
cover trivial: Detect and remove superfluous semicolons in C code
Luc noticed a superfluous trailing semicolon:
https://lists.gnu.org/archive/html/qemu-devel/2020-02/msg04593.html
Prevent that by modifying checkpatch.pl and clean the codebase.
Philippe Mathieu-Daudé (13):
scripts/checkpatch.pl: Detect superfluous semicolon in C code audio/alsaaudio: Remove superfluous semicolons
block: Remove superfluous semicolons block/io_uring: Remove superfluous semicolon 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 migration/multifd: 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
audio/alsaaudio.c | 4 ++-- block.c | 4 ++-- block/io_uring.c | 2 +- contrib/rdmacm-mux/main.c | 2 +- hw/arm/xlnx-versal-virt.c | 2 +- hw/m68k/next-cube.c | 2 +- hw/scsi/esp.c | 2 +- hw/vfio/display.c | 2 +- migration/multifd.c | 2 +- target/i386/whpx-all.c | 2 +- tests/qtest/libqos/qgraph.c | 4 ++-- ui/input-barrier.c | 2 +- scripts/checkpatch.pl | 5 +++++ 13 files changed, 20 insertions(+), 15 deletions(-)
Signature · 1 line
2.21.1
PATCH RESEND 2/13 audio/alsaaudio: Remove superfluous semicolons
---
Cc: "Kővágó, Zoltán" <[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.21.1
PATCH RESEND 1/13 scripts/checkpatch.pl: Detect superfluous semicolon in C code
In reply to Philippe Mathieu-Daudé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
---
Cc: Paolo Bonzini <[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.21.1
PATCH RESEND 3/13 block: Remove superfluous semicolons
In reply to Philippe Mathieu-Daudé--- block.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
block.c +2 -2
@@ -2435,13 +2435,13 @@ BdrvChild *bdrv_root_attach_child(BlockDriverState *child_bs,if (bdrv_get_aio_context (child_bs) != ctx) { ret =bdrv_try_set_aio_context (child_bs, ctx, &local_err);if (ret <0 && child_role->can_set_aio_ctx) { -GSList *ignore =g_slist_prepend (NULL , child);; +GSList *ignore =g_slist_prepend (NULL , child); ctx =bdrv_get_aio_context (child_bs);if (child_role->can_set_aio_ctx (child, ctx, &ignore,NULL )) {error_free (local_err); ret =0 ;g_slist_free (ignore); - ignore =g_slist_prepend (NULL , child);; + ignore =g_slist_prepend (NULL , child); child_role->set_aio_ctx (child, ctx, &ignore); }g_slist_free (ignore);
Signature · 1 line
2.21.1
PATCH RESEND 4/13 block/io_uring: Remove superfluous semicolon
In reply to Philippe Mathieu-Daudé---
Cc: Stefano Garzarella <[email protected]>
--- block/io_uring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
block/io_uring.c +1 -1
@@ -187,7 +187,7 @@ static void luring_process_completions(LuringState *s) ret =0 ; } }else { - ret = -ENOSPC ;; + ret = -ENOSPC ; } } end:
Signature · 1 line
2.21.1
PATCH RESEND 5/13 hw/arm/xlnx-versal: Remove superfluous semicolon
In reply to Philippe Mathieu-Daudé--- 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.21.1
PATCH RESEND 6/13 hw/m68k/next-cube: Remove superfluous semicolon
In reply to Philippe Mathieu-Daudé--- 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.21.1
PATCH RESEND 7/13 hw/scsi/esp: Remove superfluous semicolon
In reply to Philippe Mathieu-Daudé---
Cc: Dr. David Alan Gilbert <[email protected]>
Cc: Mark Cave-Ayland <[email protected]>
Cc: Laurent Vivier <[email protected]>
Cc: Paolo Bonzini <[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.21.1
PATCH RESEND 8/13 hw/vfio/display: Remove superfluous semicolon
In reply to Philippe Mathieu-Daudé---
Cc: Gerd Hoffmann <[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.21.1
PATCH RESEND 10/13 ui/input-barrier: Remove superfluous semicolon
In reply to Philippe Mathieu-Daudé---
Cc: Laurent Vivier <[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.21.1
PATCH RESEND 11/13 target/i386/whpx: Remove superfluous semicolon
In reply to Philippe Mathieu-Daudé---
Cc: Justin Terry (VM) <[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.21.1
PATCH RESEND 12/13 tests/qtest/libqos/qgraph: Remove superfluous semicolons
In reply to Philippe Mathieu-Daudé---
Cc: Emanuele Giuseppe Esposito <[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.21.1
PATCH RESEND 13/13 contrib/rdmacm-mux: Remove superfluous semicolon
In reply to Philippe Mathieu-Daudé---
Cc: Shamir Rabinovitch <[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.21.1
PATCH RESEND 9/13 migration/multifd: Remove superfluous semicolon
In reply to Philippe Mathieu-Daudé--- migration/multifd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
migration/multifd.c +1 -1
@@ -305,7 +305,7 @@ static int multifd_send_pages(QEMUFile *f) + p->packet_len;qemu_file_update_transfer (f, transferred); ram_counters.multifd_bytes += transferred; - ram_counters.transferred += transferred;; + ram_counters.transferred += transferred;qemu_mutex_unlock (&p->mutex);qemu_sem_post (&p->sem);
Signature · 1 line
2.21.1
Re: [PATCH RESEND 01/13] scripts/checkpatch.pl: Detect superfluous semicolon in C code
In reply to Philippe Mathieu-DaudéQuoted 10 lines · * Philippe Mathieu-Daudé ([email protected]) wrote:
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 checkedReported-by Luc Michel <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>
Quoted 25 lines
---
Cc: Paolo Bonzini <[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.21.1
--
Dr. David Alan Gilbert / [email protected] / Manchester, UK
Re: [PATCH RESEND 02/13] audio/alsaaudio: Remove superfluous semicolons
In reply to Philippe Mathieu-DaudéQuoted 2 lines · * Philippe Mathieu-Daudé ([email protected]) wrote:
Fixes 286a5d201e4Signed-off-by Philippe Mathieu-Daudé <[email protected]>
Quoted 31 lines
---
Cc: "Kővágó, Zoltán" <[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.21.1
--
Dr. David Alan Gilbert / [email protected] / Manchester, UK
Re: [PATCH RESEND 03/13] block: Remove superfluous semicolons
In reply to Philippe Mathieu-DaudéQuoted 2 lines · * Philippe Mathieu-Daudé ([email protected]) wrote:
Fixes 132ada80c4aSigned-off-by Philippe Mathieu-Daudé <[email protected]>
Quoted 27 lines
--- block.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)block.c +2
-2@@ -2435,13 +2435,13 @@ BdrvChild *bdrv_root_attach_child(BlockDriverState *child_bs,if (bdrv_get_aio_context (child_bs) != ctx) { ret =bdrv_try_set_aio_context (child_bs, ctx, &local_err);if (ret <0 && child_role->can_set_aio_ctx) { -GSList *ignore =g_slist_prepend (NULL , child);; +GSList *ignore =g_slist_prepend (NULL , child); ctx =bdrv_get_aio_context (child_bs);if (child_role->can_set_aio_ctx (child, ctx, &ignore,NULL )) {error_free (local_err); ret =0 ;g_slist_free (ignore); - ignore =g_slist_prepend (NULL , child);; + ignore =g_slist_prepend (NULL , child); child_role->set_aio_ctx (child, ctx, &ignore); }g_slist_free (ignore);Signature · 1 line
2.21.1
--
Dr. David Alan Gilbert / [email protected] / Manchester, UK
Re: [PATCH RESEND 04/13] block/io_uring: Remove superfluous semicolon
In reply to Philippe Mathieu-DaudéQuoted 4 lines · * Philippe Mathieu-Daudé ([email protected]) wrote:
Fixes 6663a0a3376Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
Cc: Stefano Garzarella <[email protected]>
Quoted 20 lines
--- block/io_uring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)block/io_uring.c +1
-1@@ -187,7 +187,7 @@ static void luring_process_completions(LuringState *s) ret =0 ; } }else { - ret = -ENOSPC ;; + ret = -ENOSPC ; } } end:Signature · 1 line
2.21.1
--
Dr. David Alan Gilbert / [email protected] / Manchester, UK
Re: [PATCH RESEND 05/13] hw/arm/xlnx-versal: Remove superfluous semicolon
In reply to Philippe Mathieu-DaudéQuoted 2 lines · * Philippe Mathieu-Daudé ([email protected]) wrote:
Fixes 6f16da53ffeSigned-off-by Philippe Mathieu-Daudé <[email protected]>
Quoted 20 lines
--- 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.21.1
--
Dr. David Alan Gilbert / [email protected] / Manchester, UK
Re: [PATCH RESEND 04/13] block/io_uring: Remove superfluous semicolon
In reply to Philippe Mathieu-DaudéQuoted 7 lines · Philippe Mathieu-Daudé
Fixes 6663a0a3376Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
Cc: Stefano Garzarella <[email protected]>--- block/io_uring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Thanks,
Stefano
Quoted 17 lines
block/io_uring.c +1
-1@@ -187,7 +187,7 @@ static void luring_process_completions(LuringState *s) ret =0 ; } }else { - ret = -ENOSPC ;; + ret = -ENOSPC ; } } end:Signature · 1 line
2.21.1
Re: [PATCH RESEND 06/13] hw/m68k/next-cube: Remove superfluous semicolon
In reply to Philippe Mathieu-DaudéQuoted 2 lines · * Philippe Mathieu-Daudé ([email protected]) wrote:
Fixes 956a78118bfSigned-off-by Philippe Mathieu-Daudé <[email protected]>
Quoted 20 lines
--- 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.21.1
--
Dr. David Alan Gilbert / [email protected] / Manchester, UK
Kevin Wolf
AppliedRe: [PATCH RESEND 04/13] block/io_uring: Remove superfluous semicolon
In reply to Philippe Mathieu-DaudéAm 18.02.2020 um 10:43 hat Philippe Mathieu-Daudé geschrieben:
Quoted 2 lines
Fixes 6663a0a3376Signed-off-by Philippe Mathieu-Daudé <[email protected]>
Thanks, applied patches 3 and 4 to the block branch.
Kevin
Re: [PATCH RESEND 07/13] hw/scsi/esp: Remove superfluous semicolon
In reply to Philippe Mathieu-DaudéQuoted 2 lines · * Philippe Mathieu-Daudé ([email protected]) wrote:
Fixes 74d71ea16bcSigned-off-by Philippe Mathieu-Daudé <[email protected]>
Quoted 25 lines
---
Cc: Dr. David Alan Gilbert <[email protected]>
Cc: Mark Cave-Ayland <[email protected]>
Cc: Laurent Vivier <[email protected]>
Cc: Paolo Bonzini <[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.21.1
--
Dr. David Alan Gilbert / [email protected] / Manchester, UK
Re: [PATCH RESEND 08/13] hw/vfio/display: Remove superfluous semicolon
In reply to Philippe Mathieu-DaudéQuoted 2 lines · * Philippe Mathieu-Daudé ([email protected]) wrote:
Fixes 8b818e059bfSigned-off-by Philippe Mathieu-Daudé <[email protected]>
Quoted 22 lines
---
Cc: Gerd Hoffmann <[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.21.1
--
Dr. David Alan Gilbert / [email protected] / Manchester, UK
Re: [PATCH RESEND 09/13] migration/multifd: Remove superfluous semicolon
In reply to Philippe Mathieu-DaudéQuoted 2 lines · * Philippe Mathieu-Daudé ([email protected]) wrote:
Fixes d32ca5ad798Signed-off-by Philippe Mathieu-Daudé <[email protected]>
Quoted 20 lines
--- migration/multifd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)migration/multifd.c +1
-1@@ -305,7 +305,7 @@ static int multifd_send_pages(QEMUFile *f) + p->packet_len;qemu_file_update_transfer (f, transferred); ram_counters.multifd_bytes += transferred; - ram_counters.transferred += transferred;; + ram_counters.transferred += transferred;qemu_mutex_unlock (&p->mutex);qemu_sem_post (&p->sem);Signature · 1 line
2.21.1
--
Dr. David Alan Gilbert / [email protected] / Manchester, UK
Re: [PATCH RESEND 10/13] ui/input-barrier: Remove superfluous semicolon
In reply to Philippe Mathieu-DaudéQuoted 4 lines · * Philippe Mathieu-Daudé ([email protected]) wrote:
Fixes 6105683da35Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
Cc: Laurent Vivier <[email protected]>
Quoted 20 lines
--- 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.21.1
--
Dr. David Alan Gilbert / [email protected] / Manchester, UK
Re: [PATCH RESEND 11/13] target/i386/whpx: Remove superfluous semicolon
In reply to Philippe Mathieu-DaudéQuoted 2 lines · * Philippe Mathieu-Daudé ([email protected]) wrote:
Fixes 812d49f2a3eSigned-off-by Philippe Mathieu-Daudé <[email protected]>
Quoted 22 lines
---
Cc: Justin Terry (VM) <[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.21.1
--
Dr. David Alan Gilbert / [email protected] / Manchester, UK
Re: [PATCH RESEND 12/13] tests/qtest/libqos/qgraph: Remove superfluous semicolons
In reply to Philippe Mathieu-DaudéQuoted 2 lines · * Philippe Mathieu-Daudé ([email protected]) wrote:
Fixes fc281c80202Signed-off-by Philippe Mathieu-Daudé <[email protected]>
Quoted 31 lines
---
Cc: Emanuele Giuseppe Esposito <[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.21.1
--
Dr. David Alan Gilbert / [email protected] / Manchester, UK
Re: [PATCH RESEND 13/13] contrib/rdmacm-mux: Remove superfluous semicolon
In reply to Philippe Mathieu-DaudéQuoted 2 lines · * Philippe Mathieu-Daudé ([email protected]) wrote:
Fixes a5d2f6f8773Signed-off-by Philippe Mathieu-Daudé <[email protected]>
Quoted 22 lines
---
Cc: Shamir Rabinovitch <[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.21.1
--
Dr. David Alan Gilbert / [email protected] / Manchester, UK
Re: [PATCH RESEND 01/13] scripts/checkpatch.pl: Detect superfluous semicolon in C code
In reply to Philippe Mathieu-DaudéQuoted 10 lines · Philippe Mathieu-Daudé
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 checkedReported-by Luc Michel <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>
Re: [PATCH RESEND 02/13] audio/alsaaudio: Remove superfluous semicolons
In reply to Philippe Mathieu-DaudéQuoted 2 lines · Philippe Mathieu-Daudé
Fixes 286a5d201e4Signed-off-by Philippe Mathieu-Daudé <[email protected]>
Re: [PATCH RESEND 09/13] migration/multifd: Remove superfluous semicolon
In reply to Philippe Mathieu-DaudéQuoted 2 lines · Philippe Mathieu-Daudé
Fixes d32ca5ad798Signed-off-by Philippe Mathieu-Daudé <[email protected]>
Re: [PATCH RESEND 13/13] contrib/rdmacm-mux: Remove superfluous semicolon
In reply to Philippe Mathieu-DaudéQuoted 2 lines · Philippe Mathieu-Daudé
Fixes a5d2f6f8773Signed-off-by Philippe Mathieu-Daudé <[email protected]>
Re: [PATCH RESEND 03/13] block: Remove superfluous semicolons
In reply to Philippe Mathieu-DaudéQuoted 2 lines · Philippe Mathieu-Daudé
Fixes 132ada80c4aSigned-off-by Philippe Mathieu-Daudé <[email protected]>
Re: [PATCH RESEND 04/13] block/io_uring: Remove superfluous semicolon
In reply to Philippe Mathieu-DaudéQuoted 2 lines · Philippe Mathieu-Daudé
Fixes 6663a0a3376Signed-off-by Philippe Mathieu-Daudé <[email protected]>
Re: [PATCH RESEND 05/13] hw/arm/xlnx-versal: Remove superfluous semicolon
In reply to Philippe Mathieu-DaudéQuoted 2 lines · Philippe Mathieu-Daudé
Fixes 6f16da53ffeSigned-off-by Philippe Mathieu-Daudé <[email protected]>
Re: [PATCH RESEND 06/13] hw/m68k/next-cube: Remove superfluous semicolon
In reply to Philippe Mathieu-DaudéQuoted 2 lines · Philippe Mathieu-Daudé
Fixes 956a78118bfSigned-off-by Philippe Mathieu-Daudé <[email protected]>
Re: [PATCH RESEND 07/13] hw/scsi/esp: Remove superfluous semicolon
In reply to Philippe Mathieu-DaudéQuoted 2 lines · Philippe Mathieu-Daudé
Fixes 74d71ea16bcSigned-off-by Philippe Mathieu-Daudé <[email protected]>
Re: [PATCH RESEND 08/13] hw/vfio/display: Remove superfluous semicolon
In reply to Philippe Mathieu-DaudéQuoted 2 lines · Philippe Mathieu-Daudé
Fixes 8b818e059bfSigned-off-by Philippe Mathieu-Daudé <[email protected]>
Re: [PATCH RESEND 09/13] migration/multifd: Remove superfluous semicolon
In reply to Philippe Mathieu-DaudéQuoted 2 lines · Philippe Mathieu-Daudé
Fixes d32ca5ad798Signed-off-by Philippe Mathieu-Daudé <[email protected]>
I forgot, queued on migration branch.
Re: [PATCH RESEND 10/13] ui/input-barrier: Remove superfluous semicolon
In reply to Philippe Mathieu-DaudéQuoted 2 lines · Philippe Mathieu-Daudé
Fixes 6105683da35Signed-off-by Philippe Mathieu-Daudé <[email protected]>
Re: [PATCH RESEND 11/13] target/i386/whpx: Remove superfluous semicolon
In reply to Philippe Mathieu-DaudéQuoted 2 lines · Philippe Mathieu-Daudé
Fixes 812d49f2a3eSigned-off-by Philippe Mathieu-Daudé <[email protected]>
Re: [PATCH RESEND 12/13] tests/qtest/libqos/qgraph: Remove superfluous semicolons
In reply to Philippe Mathieu-DaudéQuoted 2 lines · Philippe Mathieu-Daudé
Fixes fc281c80202Signed-off-by Philippe Mathieu-Daudé <[email protected]>
Re: [PATCH RESEND 01/13] scripts/checkpatch.pl: Detect superfluous semicolon in C code
In reply to Philippe Mathieu-DaudéQuoted 10 lines · Philippe Mathieu-Daudé
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 checkedReported-by Luc Michel <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>
Quoted 23 lines
---
Cc: Paolo Bonzini <[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);
Quoted 20 lines · Philippe Mathieu-Daudé
Luc noticed a superfluous trailing semicolon:
https://lists.gnu.org/archive/html/qemu-devel/2020-02/msg04593.htmlPrevent that by modifying checkpatch.pl and clean the codebase.
Philippe Mathieu-Daudé (13):
scripts/checkpatch.pl: Detect superfluous semicolon in C code audio/alsaaudio: Remove superfluous semicolons
block: Remove superfluous semicolonsblock/io_uring: Remove superfluous semicolon 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 migration/multifd: 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
Quoted 15 lines
audio/alsaaudio.c | 4 ++-- block.c | 4 ++-- block/io_uring.c | 2 +- contrib/rdmacm-mux/main.c | 2 +- hw/arm/xlnx-versal-virt.c | 2 +- hw/m68k/next-cube.c | 2 +- hw/scsi/esp.c | 2 +- hw/vfio/display.c | 2 +- migration/multifd.c | 2 +- target/i386/whpx-all.c | 2 +- tests/qtest/libqos/qgraph.c | 4 ++-- ui/input-barrier.c | 2 +- scripts/checkpatch.pl | 5 +++++ 13 files changed, 20 insertions(+), 15 deletions(-)
Laurent, can you queue this in qemu-trivial?
Quoted 37 lines · Paolo Bonzini
Quoted 20 lines · Philippe Mathieu-Daudé
Luc noticed a superfluous trailing semicolon:
https://lists.gnu.org/archive/html/qemu-devel/2020-02/msg04593.htmlPrevent that by modifying checkpatch.pl and clean the codebase.
Philippe Mathieu-Daudé (13):
scripts/checkpatch.pl: Detect superfluous semicolon in C code audio/alsaaudio: Remove superfluous semicolons
block: Remove superfluous semicolonsblock/io_uring: Remove superfluous semicolon 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 migration/multifd: 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 semicolonQuoted 15 lines
audio/alsaaudio.c | 4 ++-- block.c | 4 ++-- block/io_uring.c | 2 +- contrib/rdmacm-mux/main.c | 2 +- hw/arm/xlnx-versal-virt.c | 2 +- hw/m68k/next-cube.c | 2 +- hw/scsi/esp.c | 2 +- hw/vfio/display.c | 2 +- migration/multifd.c | 2 +- target/i386/whpx-all.c | 2 +- tests/qtest/libqos/qgraph.c | 4 ++-- ui/input-barrier.c | 2 +- scripts/checkpatch.pl | 5 +++++ 13 files changed, 20 insertions(+), 15 deletions(-)
Quoted 4 lines
Acked-by Paolo Bonzini <[email protected]>Laurent, can you queue this in qemu-trivial?
Yes, I will.
Thanks,
Laurent
Le 18/02/2020 à 18:04, Paolo Bonzini a écrit :
Quoted 37 lines · Philippe Mathieu-Daudé
Quoted 20 lines
Luc noticed a superfluous trailing semicolon:
https://lists.gnu.org/archive/html/qemu-devel/2020-02/msg04593.htmlPrevent that by modifying checkpatch.pl and clean the codebase.
Philippe Mathieu-Daudé (13):
scripts/checkpatch.pl: Detect superfluous semicolon in C code audio/alsaaudio: Remove superfluous semicolons
block: Remove superfluous semicolonsblock/io_uring: Remove superfluous semicolon 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 migration/multifd: 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 semicolonQuoted 15 lines
audio/alsaaudio.c | 4 ++-- block.c | 4 ++-- block/io_uring.c | 2 +- contrib/rdmacm-mux/main.c | 2 +- hw/arm/xlnx-versal-virt.c | 2 +- hw/m68k/next-cube.c | 2 +- hw/scsi/esp.c | 2 +- hw/vfio/display.c | 2 +- migration/multifd.c | 2 +- target/i386/whpx-all.c | 2 +- tests/qtest/libqos/qgraph.c | 4 ++-- ui/input-barrier.c | 2 +- scripts/checkpatch.pl | 5 +++++ 13 files changed, 20 insertions(+), 15 deletions(-)
Quoted 4 lines
Acked-by Paolo Bonzini <[email protected]>Laurent, can you queue this in qemu-trivial?
Queued, except patches 3, 4 (taken by Kevin) and 9 (by Juan)
Thanks,
Laurent
Justin Terry (SF)
Reviewed-byRE: [EXTERNAL] Re: [PATCH RESEND 11/13] target/i386/whpx: Remove superfluous semicolon
In reply to Dr. David Alan Gilbert+Sunil Muthuswamy <[email protected]>
LGTM. Thanks!
Quoted 53 lines
-----Original Message-----
From: Dr. David Alan Gilbert <[email protected]>
Sent: Tuesday, February 18, 2020 2:00 AM
To: Philippe Mathieu-Daudé <[email protected]>
Cc: [email protected]; Max Reitz <[email protected]>; Kevin Wolf <[email protected]>; Thomas Huth <[email protected]>; Fam Zheng <[email protected]>; Eduardo Habkost <[email protected]>; Alex Williamson <[email protected]>; Marcel Apfelbaum <[email protected]>; Richard Henderson <[email protected]>; Julia Suvorova <[email protected]>; Thomas Huth <[email protected]>; Edgar E. Iglesias <[email protected]>; Aarushi Mehta <[email protected]>; [email protected]; Stefan Hajnoczi <[email protected]>; Alistair Francis <[email protected]>; Gerd Hoffmann <[email protected]>; Luc Michel <[email protected]>; Laurent Vivier <[email protected]>; Juan Quintela <[email protected]>; Michael Tokarev <[email protected]>; Laurent Vivier <[email protected]>; Paolo Bonzini <[email protected]>; Yuval Shaia <[email protected]>; [email protected]; Peter Maydell <[email protected]>; [email protected]; Justin Terry (SF) <[email protected]>
Subject: [EXTERNAL] Re: [PATCH RESEND 11/13] target/i386/whpx: Remove superfluous semicolonQuoted 2 lines · * Philippe Mathieu-Daudé ([email protected]) wrote:
Fixes 812d49f2a3eSigned-off-by Philippe Mathieu-Daudé <[email protected]>Reviewed-by Dr. David Alan Gilbert <[email protected]>Quoted 20 lines
---
Cc: Justin Terry (VM) <[email protected]>--- target/i386/whpx-all.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)target/i386/whpx-all.c index renamed from target/i386/whpx-all.c +0
-0
3ed2aa1892..35601b8176100644target/i386/whpx-all.c +1
-2@@ -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); --Quoted 2 lines
2.21.1
--
Dr. David Alan Gilbert / [email protected] / Manchester, UK