diff mbox series

[v4,04/26] gdbstub: clean-up indent on gdb_exit

Message ID 20230302190846.2593720-5-alex.bennee@linaro.org
State Superseded
Headers show
Series gdbstub/next: re-organise and split build | expand

Commit Message

Alex Bennée March 2, 2023, 7:08 p.m. UTC
Otherwise checkpatch will throw a hissy fit on the later patches that
split this function up.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 gdbstub/gdbstub.c | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

Comments

Richard Henderson March 2, 2023, 8:29 p.m. UTC | #1
On 3/2/23 09:08, Alex Bennée wrote:
> Otherwise checkpatch will throw a hissy fit on the later patches that
> split this function up.
> 
> Signed-off-by: Alex Bennée<alex.bennee@linaro.org>
> ---
>   gdbstub/gdbstub.c | 28 ++++++++++++++--------------
>   1 file changed, 14 insertions(+), 14 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~
Daniel Henrique Barboza March 3, 2023, 8:33 a.m. UTC | #2
On 3/2/23 16:08, Alex Bennée wrote:
> Otherwise checkpatch will throw a hissy fit on the later patches that
> split this function up.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---

Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>

>   gdbstub/gdbstub.c | 28 ++++++++++++++--------------
>   1 file changed, 14 insertions(+), 14 deletions(-)
> 
> diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c
> index fb9c49e0fd..63b56f0027 100644
> --- a/gdbstub/gdbstub.c
> +++ b/gdbstub/gdbstub.c
> @@ -3021,27 +3021,27 @@ static void gdb_read_byte(uint8_t ch)
>   /* Tell the remote gdb that the process has exited.  */
>   void gdb_exit(int code)
>   {
> -  char buf[4];
> +    char buf[4];
>   
> -  if (!gdbserver_state.init) {
> -      return;
> -  }
> +    if (!gdbserver_state.init) {
> +        return;
> +    }
>   #ifdef CONFIG_USER_ONLY
> -  if (gdbserver_state.socket_path) {
> -      unlink(gdbserver_state.socket_path);
> -  }
> -  if (gdbserver_state.fd < 0) {
> -      return;
> -  }
> +    if (gdbserver_state.socket_path) {
> +        unlink(gdbserver_state.socket_path);
> +    }
> +    if (gdbserver_state.fd < 0) {
> +        return;
> +    }
>   #endif
>   
> -  trace_gdbstub_op_exiting((uint8_t)code);
> +    trace_gdbstub_op_exiting((uint8_t)code);
>   
> -  snprintf(buf, sizeof(buf), "W%02x", (uint8_t)code);
> -  put_packet(buf);
> +    snprintf(buf, sizeof(buf), "W%02x", (uint8_t)code);
> +    put_packet(buf);
>   
>   #ifndef CONFIG_USER_ONLY
> -  qemu_chr_fe_deinit(&gdbserver_state.chr, true);
> +    qemu_chr_fe_deinit(&gdbserver_state.chr, true);
>   #endif
>   }
>
diff mbox series

Patch

diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c
index fb9c49e0fd..63b56f0027 100644
--- a/gdbstub/gdbstub.c
+++ b/gdbstub/gdbstub.c
@@ -3021,27 +3021,27 @@  static void gdb_read_byte(uint8_t ch)
 /* Tell the remote gdb that the process has exited.  */
 void gdb_exit(int code)
 {
-  char buf[4];
+    char buf[4];
 
-  if (!gdbserver_state.init) {
-      return;
-  }
+    if (!gdbserver_state.init) {
+        return;
+    }
 #ifdef CONFIG_USER_ONLY
-  if (gdbserver_state.socket_path) {
-      unlink(gdbserver_state.socket_path);
-  }
-  if (gdbserver_state.fd < 0) {
-      return;
-  }
+    if (gdbserver_state.socket_path) {
+        unlink(gdbserver_state.socket_path);
+    }
+    if (gdbserver_state.fd < 0) {
+        return;
+    }
 #endif
 
-  trace_gdbstub_op_exiting((uint8_t)code);
+    trace_gdbstub_op_exiting((uint8_t)code);
 
-  snprintf(buf, sizeof(buf), "W%02x", (uint8_t)code);
-  put_packet(buf);
+    snprintf(buf, sizeof(buf), "W%02x", (uint8_t)code);
+    put_packet(buf);
 
 #ifndef CONFIG_USER_ONLY
-  qemu_chr_fe_deinit(&gdbserver_state.chr, true);
+    qemu_chr_fe_deinit(&gdbserver_state.chr, true);
 #endif
 }